aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opt_share/run-test.sh
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2020-09-16 19:58:16 +0200
committerXiretza <xiretza@xiretza.xyz>2020-09-21 15:07:02 +0200
commit01260344d3eda4df701f1703f115f4eed609c730 (patch)
treedfe6136fd0927af015a1665582bffccac88ca353 /tests/opt_share/run-test.sh
parentacd47bbd52d11216b883b99f3e17ae4ffbd5f4a3 (diff)
downloadyosys-01260344d3eda4df701f1703f115f4eed609c730.tar.gz
yosys-01260344d3eda4df701f1703f115f4eed609c730.tar.bz2
yosys-01260344d3eda4df701f1703f115f4eed609c730.zip
tests: Parallelize
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 ) )