Speed up "make test" and related cleanups
authorClifford Wolf <clifford@clifford.at>
Sat, 17 Aug 2019 12:37:07 +0000 (14:37 +0200)
committerClifford Wolf <clifford@clifford.at>
Sat, 17 Aug 2019 12:37:07 +0000 (14:37 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Makefile
tests/fsm/run-test.sh
tests/simple_abc9/run-test.sh
tests/various/.gitignore
tests/various/run-test.sh
tests/various/shregmap.ys

index 95b5d451beb26b5d83899f1ca6ff6830caba165e..f4ff493b06f009257d2a7ec49553eda8eaa609ba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -682,6 +682,7 @@ endif
 
 test: $(TARGETS) $(EXTRA_TARGETS)
        +cd tests/simple && bash run-test.sh $(SEEDOPT)
+       +cd tests/simple_abc9 && bash run-test.sh $(SEEDOPT)
        +cd tests/hana && bash run-test.sh $(SEEDOPT)
        +cd tests/asicworld && bash run-test.sh $(SEEDOPT)
        # +cd tests/realmath && bash run-test.sh $(SEEDOPT)
@@ -696,7 +697,6 @@ test: $(TARGETS) $(EXTRA_TARGETS)
        +cd tests/opt && bash run-test.sh
        +cd tests/aiger && bash run-test.sh $(ABCOPT)
        +cd tests/arch && bash run-test.sh
-       +cd tests/simple_abc9 && bash run-test.sh $(SEEDOPT)
        @echo ""
        @echo "  Passed \"make test\"."
        @echo ""
index cf506470deae33f4c772970048c99ce926bb2ace..fbdcbf048f04da9eea8fa1598f345169da2d709c 100755 (executable)
@@ -6,7 +6,7 @@
 set -e
 
 OPTIND=1
-count=100
+count=50
 seed=""    # default to no seed specified
 while getopts "c:S:" opt
 do
index 4935d41ad6aba19616293eb0e8c9b3d7fd2a1ff7..49ae23338f78cc2369fcf1cb5ab49bcc9a367c45 100755 (executable)
@@ -18,5 +18,6 @@ if ! which iverilog > /dev/null ; then
 fi
 
 cp ../simple/*.v .
+cp ../simple/*.sv .
 DOLLAR='?'
-exec ${MAKE:-make} -f ../tools/autotest.mk $seed *.v EXTRA_FLAGS="-p 'hierarchy; synth -run coarse; opt -full; techmap; abc9 -lut 4 -box ../abc.box; stat; check -assert; select -assert-none t:${DOLLAR}_NOT_ t:${DOLLAR}_AND_ %%'"
+exec ${MAKE:-make} -f ../tools/autotest.mk $seed *.v EXTRA_FLAGS="-n 300 -p 'hierarchy; synth -run coarse; opt -full; techmap; abc9 -lut 4 -box ../abc.box; stat; check -assert; select -assert-none t:${DOLLAR}_NOT_ t:${DOLLAR}_AND_ %%'"
index 31078b2982fc29291625451d36552720213c7fbd..4b286fd61a610346ea87c681ba3c9e318a31fbcd 100644 (file)
@@ -2,3 +2,4 @@
 /*.out
 /write_gzip.v
 /write_gzip.v.gz
+/run-test.mk
index 92b90576504755b93902326ae4edc39e66df8a02..ea56b70f029f9ce25afd09b08be9649d3e41b7a7 100755 (executable)
@@ -1,12 +1,20 @@
 #!/usr/bin/env bash
 set -e
+{
+echo "all::"
 for x in *.ys; do
-       echo "Running $x.."
-       ../../yosys -ql ${x%.ys}.log $x
+       echo "all:: run-$x"
+       echo "run-$x:"
+       echo "  @echo 'Running $x..'"
+       echo "  @../../yosys -ql ${x%.ys}.log $x"
 done
 for s in *.sh; do
        if [ "$s" != "run-test.sh" ]; then
-               echo "Running $s.."
-               bash $s
+               echo "all:: run-$s"
+               echo "run-$s:"
+               echo "  @echo 'Running $s..'"
+               echo "  @bash $s"
        fi
 done
+} > run-test.mk
+exec ${MAKE:-make} -f run-test.mk
index d644a88aae1d4dc64a1f8a43a1f1d9ff0fdeecec..5c9c78dd249da8e5cc9d9f50696565bacaeb7066 100644 (file)
@@ -45,7 +45,7 @@ shregmap -tech xilinx
 
 stat
 # show -width
-write_verilog -noexpr -norename
+write_verilog -noexpr -norename
 select -assert-count 1 t:$_DFF_P_
 select -assert-count 2 t:$__XILINX_SHREG_
 
@@ -59,8 +59,8 @@ prep
 miter -equiv -flatten -make_assert -make_outputs gold gate miter
 sat -verify -prove-asserts -show-ports -seq 5 miter
 
-design -load gold
-stat
+design -load gold
+stat
 
-design -load gate
-stat
+design -load gate
+stat