diff options
Diffstat (limited to 'test_semantics.sh')
-rwxr-xr-x | test_semantics.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test_semantics.sh b/test_semantics.sh new file mode 100755 index 0000000..c84fc2a --- /dev/null +++ b/test_semantics.sh @@ -0,0 +1,20 @@ +#! /bin/bash +dir=semantics_data/*.c +if [ "$#" != 0 ]; then + dir=$1 +fi +res=0 +for file in $dir +do + gcc $file -o /dev/null &> /dev/null + gcc_ret="$?" + ./cibic $file &> /dev/null + ret=$? + if [ $ret -ne $gcc_ret ]; then + echo "Failed on $file" + res=1 + else + echo "ok $file: $ret" + fi +done +exit $res |