aboutsummaryrefslogtreecommitdiff
path: root/test_all.sh
blob: 6a9db22827836928ff48e6cea7b995e15a754cee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/bash
dir=testcases/*.c
if [ "$#" != 0 ]; then
    dir=$1
fi
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"
    else
        echo "ok $file: $ret"
    fi
done