mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-19 03:12:18 +00:00
Test --link functionality
This commit is contained in:
parent
829b4cc32f
commit
67ffd25c49
6 changed files with 45 additions and 0 deletions
2
tests/links/Makefile
Normal file
2
tests/links/Makefile
Normal file
|
@ -0,0 +1,2 @@
|
|||
SUBDIR=links
|
||||
include ../make/subdir.mk
|
3
tests/links/dir/script.ys
Normal file
3
tests/links/dir/script.ys
Normal file
|
@ -0,0 +1,3 @@
|
|||
read -sv picorv32.v
|
||||
read -sv prv32fmcmp.v
|
||||
prep -top prv32fmcmp
|
1
tests/links/prv32fmcmp.v
Symbolic link
1
tests/links/prv32fmcmp.v
Symbolic link
|
@ -0,0 +1 @@
|
|||
../unsorted/prv32fmcmp.v
|
12
tests/links/symlink.py
Normal file
12
tests/links/symlink.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
def main():
|
||||
workdir, task = sys.argv[1:]
|
||||
src = Path(workdir) / "src"
|
||||
for srcfile in src.iterdir():
|
||||
assert(srcfile.is_symlink() == (task == "link"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
18
tests/links/symlink.sby
Normal file
18
tests/links/symlink.sby
Normal file
|
@ -0,0 +1,18 @@
|
|||
[tasks]
|
||||
link
|
||||
copy
|
||||
|
||||
[options]
|
||||
mode prep
|
||||
|
||||
[engines]
|
||||
btor btormc
|
||||
|
||||
[script]
|
||||
read -noverific
|
||||
script dir/script.ys
|
||||
|
||||
[files]
|
||||
../../docs/examples/demos/picorv32.v
|
||||
prv32fmcmp.v
|
||||
dir
|
9
tests/links/symlink.sh
Normal file
9
tests/links/symlink.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
if [[ $TASK == link ]]; then
|
||||
flags="--setup --link"
|
||||
else
|
||||
flags="--setup"
|
||||
fi
|
||||
python3 $SBY_MAIN -f $SBY_FILE $TASK $flags
|
||||
python3 ${SBY_FILE%.sby}.py $WORKDIR $TASK
|
Loading…
Add table
Add a link
Reference in a new issue