3 # run this test many times:
4 # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done'
10 seed
="" # default to no seed specified
11 while getopts "c:S:" opt
15 S
) seed
="-S $OPTARG" ;;
22 echo "generating tests.."
23 python3 generate.py
-c $count $seed
25 echo "running tests.."
26 for i
in $
( ls temp
/*.ys |
sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do
28 idx
=$
( printf "%05d" $i )
29 ..
/..
/yosys
-ql temp
/uut_
${idx}.log temp
/uut_
${idx}.ys
33 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
) )
34 if [ -n "$failed_share" ]; then
35 echo "Resource sharing failed for the following test cases: $failed_share"