changes
authorPeizhao Ou <peizhaoo@uci.edu>
Tue, 17 Mar 2015 22:28:10 +0000 (15:28 -0700)
committerPeizhao Ou <peizhaoo@uci.edu>
Tue, 17 Mar 2015 22:28:10 +0000 (15:28 -0700)
infer.sh [new file with mode: 0755]

diff --git a/infer.sh b/infer.sh
new file mode 100755 (executable)
index 0000000..9d8d25b
--- /dev/null
+++ b/infer.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+#TESTCASES=( testcase1 testcase2 testcase3 testcase4 testcase5 )
+TESTCASES=( testcase1 )
+
+BENCH=chase-lev-deque-bugfix
+
+for((i=0;i<${#TESTCASES[@]};i++))
+do
+       #echo "$i: ${TESTCASES[$i]}"
+
+       input=result$i.txt
+       output=result$(($i+1)).txt
+
+       echo input:$input
+       echo output:$output
+
+       if [ $i == 0 ]; then
+               sh run.sh $BENCH/${TESTCASES[$i]}_wildcard -m2 -y -u3 -tSCFENCE &> tmp.txt
+       else
+               sh run.sh $BENCH/${TESTCASES[$i]}_wildcard -m2 -y -u3 -tSCFENCE -o f$input &> tmp.txt
+       fi
+               
+       firstLine=`grep "Result 0" tmp.txt -n | tail -n 1 | sed -n 's/^\([0-9]*\)[:].*/\1/p'`
+       lastLine=`grep "wildcard" tmp.txt -n | tail -n 1 | sed -n 's/^\([0-9]*\)[:].*/\1/p'`
+       head tmp.txt -n "$lastLine" | tail  -n +"$firstLine" &> $output
+
+done
+
+