diff --git a/.gitattributes b/.gitattributes index f46220bd3a2af7bfedf2142e3d4ac6198e48db96..b3ab851d7387948ce060613ca2c6b36b9ed8a793 100644 --- a/.gitattributes +++ b/.gitattributes @@ -557,6 +557,7 @@ tests/spec/mcf_exp/mcf.out -text tests/spec/mcf_test.sh -text tests/spec/milc -text tests/spec/milc_exp/milc.out -text +tests/spec/milc_test.sh -text tests/spec/perlbench -text tests/spec/sjeng -text tests/spec/sjeng_exp/sjeng.out -text diff --git a/tests/spec/milc_test.sh b/tests/spec/milc_test.sh new file mode 100755 index 0000000000000000000000000000000000000000..d4bbe886a8a3646c3d711b6a5422c43d731d3c92 --- /dev/null +++ b/tests/spec/milc_test.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +BENCH_FILE=$SECURITY_TRANSFORMS_HOME/tests/spec/milc_exp/milc.out +INPUT_FILE=$SPEC_HOME/benchspec/CPU2006/433.milc/data/train/input/su3imp.in + + + +rm -f act.out act.err +echo "timeout 120 $1 $INPUT_FILE >act.out 2>act.err" +timeout 120 $1 <$INPUT_FILE >act.out 2>act.err +status=$? +if [ $status -ne 0 ];then + echo "TEST WRAPPER FAILURE: Exit Status Non-Zero: $status" + exit 1 +fi + +diff $BENCH_FILE act.out +if [ $? -ne 0 ];then + echo "TEST WRAPPER FAILURE: Actual Output Differs from Expected" + exit 1 +fi + +rm -f empty +touch empty + +diff act.err empty +if [ $? -ne 0 ];then + echo "TEST WRAPPER FAILURE: Actual Error Differs from Expected" + exit 1 +fi + +echo "TEST WRAPPER SUCCESS" +exit 0 \ No newline at end of file