diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..8803061 --- /dev/null +++ b/test.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# yi, yi2, dave, long, trans + +if [ $# -lt 3 ]; then + echo "Not enough arguments." + exit +fi + +arg1=$1; shift 1 +arg2=$1; shift 1 +arg3=$1; shift 1 + +files=() +if [ "$1" == '*' ]; then + files+=( 'dave' 'long' 'trans' 'yi' 'yi2' ) +elif [ $# ]; then + for arg in $@; do + files+=("$arg") + done +else + files+=( 'dave' 'long' 'trans' 'yi' 'yi2' ) +fi + +echo 'Only errors are shown. Order is "s E b file"' +for i in $(seq $arg1); do + for j in $(seq $arg2); do + for k in $(seq $arg3); do + for f in ${files[@]}; do + args="-s $i -E $j -b $k -t traces/$f.trace" + dif=$(diff <(./csim $args) <(./csim-ref $args)) + if [dif]; then + echo "$i $j $k $f" + fi + done + done + done +done