summaryrefslogtreecommitdiff
path: root/tests/realmath/run-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/realmath/run-test.sh')
-rwxr-xr-xtests/realmath/run-test.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/realmath/run-test.sh b/tests/realmath/run-test.sh
index f1ec5476..e1a36c69 100755
--- a/tests/realmath/run-test.sh
+++ b/tests/realmath/run-test.sh
@@ -1,14 +1,26 @@
#!/bin/bash
set -e
+OPTIND=1
+count=100
+seed="" # default to no seed specified
+while getopts "c:S:" opt
+do
+ case "$opt" in
+ c) count="$OPTARG" ;;
+ S) seed="-S $OPTARG" ;;
+ esac
+done
+shift "$((OPTIND-1))"
+
rm -rf temp
mkdir -p temp
echo "generating tests.."
-python3 generate.py
+python3 generate.py -c $count $seed
cd temp
echo "running tests.."
-for ((i = 0; i < 100; i++)); do
+for ((i = 0; i < $count; i++)); do
echo -n "[$i]"
idx=$( printf "%05d" $i )
../../../yosys -qq uut_${idx}.ys