2023-08-11 20:59:39 -05:00
|
|
|
#!/usr/bin/env bash
|
2015-01-01 12:42:39 -06:00
|
|
|
|
|
|
|
# run this test many times:
|
2015-01-03 03:57:01 -06:00
|
|
|
# MAKE="make -j8" time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done'
|
2015-01-01 12:42:39 -06:00
|
|
|
|
|
|
|
set -e
|
2016-09-15 03:00:29 -05:00
|
|
|
|
|
|
|
OPTIND=1
|
|
|
|
count=5
|
|
|
|
seed="" # default to no seed specified
|
|
|
|
debug=""
|
2016-11-01 04:03:13 -05:00
|
|
|
while getopts "c:dS:" opt
|
2016-09-15 03:00:29 -05:00
|
|
|
do
|
|
|
|
case "$opt" in
|
|
|
|
c) count="$OPTARG" ;;
|
|
|
|
d) debug="-d" ;;
|
|
|
|
S) seed="-S $OPTARG" ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift "$((OPTIND-1))"
|
|
|
|
|
2015-01-01 12:42:39 -06:00
|
|
|
rm -rf temp
|
|
|
|
mkdir -p temp
|
|
|
|
|
|
|
|
echo "generating tests.."
|
2016-09-15 03:00:29 -05:00
|
|
|
python3 generate.py $debug -c $count $seed
|
2015-01-01 12:42:39 -06:00
|
|
|
|
|
|
|
{
|
|
|
|
echo -n "all:"
|
|
|
|
for i in $( ls temp/brams_*.txt | sed 's,.*_,,; s,\..*,,;' ); do
|
|
|
|
for j in $( ls temp/brams_*.txt | sed 's,.*_,,; s,\..*,,;' | grep -v $i ); do
|
2015-01-01 17:07:44 -06:00
|
|
|
echo -n " temp/job_${i}_${j}.ok"
|
2015-01-01 12:42:39 -06:00
|
|
|
done; done
|
|
|
|
echo
|
|
|
|
for i in $( ls temp/brams_*.txt | sed 's,.*_,,; s,\..*,,;' ); do
|
|
|
|
for j in $( ls temp/brams_*.txt | sed 's,.*_,,; s,\..*,,;' | grep -v $i ); do
|
2015-01-01 17:07:44 -06:00
|
|
|
echo "temp/job_${i}_${j}.ok:"
|
|
|
|
echo " @bash run-single.sh ${i} ${j}"
|
2015-01-02 06:59:47 -06:00
|
|
|
echo " @echo 'Passed memory_bram test ${i}_${j}.'"
|
2015-01-01 12:42:39 -06:00
|
|
|
echo " @touch \$@"
|
|
|
|
done; done
|
|
|
|
} > temp/makefile
|
|
|
|
|
|
|
|
echo "running tests.."
|
|
|
|
${MAKE:-make} -f temp/makefile
|
|
|
|
|
|
|
|
exit 0
|