Created test.sh

This commit is contained in:
Jacob 2016-04-28 01:16:02 -04:00
parent 88240dab06
commit 67c38d4fe7

38
test.sh Executable file
View File

@ -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