From 3cd0142c29dd02d1163f9a648487d21f177b5697 Mon Sep 17 00:00:00 2001 From: Peizhao Ou Date: Tue, 17 Mar 2015 15:28:10 -0700 Subject: [PATCH] changes --- infer.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 infer.sh diff --git a/infer.sh b/infer.sh new file mode 100755 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 + + -- 2.34.1