aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opt_share/run-test.sh
diff options
context:
space:
mode:
authorclairexen <claire@symbioticeda.com>2020-10-01 18:12:31 +0200
committerGitHub <noreply@github.com>2020-10-01 18:12:31 +0200
commit2412e754953595627e8c87ff0aa773929c71a852 (patch)
treebc02013f6312a0c1cb8351e213bd7e08255d79f9 /tests/opt_share/run-test.sh
parentc4bfbecca60eaf8c02a792627c1e49b5dde3cdeb (diff)
parentbed14241efbf9949d0ed9d84836d7a019895dfde (diff)
downloadyosys-2412e754953595627e8c87ff0aa773929c71a852.tar.gz
yosys-2412e754953595627e8c87ff0aa773929c71a852.tar.bz2
yosys-2412e754953595627e8c87ff0aa773929c71a852.zip
Merge pull request #2380 from Xiretza/parallel-tests
Clean up and parallelize testsuite
Diffstat (limited to 'tests/opt_share/run-test.sh')
-rwxr-xr-xtests/opt_share/run-test.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/tests/opt_share/run-test.sh b/tests/opt_share/run-test.sh
index e01552646..e0008a259 100755
--- a/tests/opt_share/run-test.sh
+++ b/tests/opt_share/run-test.sh
@@ -22,12 +22,23 @@ mkdir -p temp
echo "generating tests.."
python3 generate.py -c $count $seed
+{
+ echo ".PHONY: all"
+ echo "all:"
+
+ for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
+ idx=$( printf "%05d" $i )
+ echo ".PHONY: test-$idx"
+ echo "all: test-$idx"
+ echo "test-$idx:"
+ printf "\t@%s\n" \
+ "echo -n [$i]" \
+ "../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys"
+ done
+} > temp/makefile
+
echo "running tests.."
-for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
- echo -n "[$i]"
- idx=$( printf "%05d" $i )
- ../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys
-done
+${MAKE:-make} -f temp/makefile
echo
failed_share=$( echo $( gawk '/^#job#/ { j=$2; db[j]=0; } /^Removing [246] cells/ { delete db[j]; } END { for (j in db) print(j); }' temp/all_share_log.txt ) )