aboutsummaryrefslogtreecommitdiff
path: root/test_all.sh
blob: 4dda78e2d692a9666a64a029c493a48bf82cb7d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/bash
dir=testcases/*.c
if [ "$#" != 0 ]; then
    dir=$1
fi
res=0
for file in $dir
do
    gcc $file -o /dev/null &> /dev/null
    gcc_ret="$?"
    ./cibic --sem $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