diff options
author | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-30 21:30:53 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-30 21:30:53 +1100 |
commit | 3d372ecf513c951675602286b296f7af520bb3cf (patch) | |
tree | 87b3a75507c64e202ffc6d83028e9da1821412c9 /impl/test | |
parent | 093a35f07986ecfac8c43d053445e8417c7c2139 (diff) | |
parent | 6a4786bde976e9a023c7f65a395384d214c5102c (diff) |
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'impl/test')
-rw-r--r-- | impl/test/run | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/impl/test/run b/impl/test/run index 0c1886d..169edda 100644 --- a/impl/test/run +++ b/impl/test/run @@ -7,7 +7,10 @@ FAILED=0 echo "Testing binary: $1 in directory $DIR" while [ -f "$DIR/$NUM.eqns" ] do - OUTPUT=$($1 "$DIR/$NUM.eqns") + OUTPUT=$(timeout 5s $1 "$DIR/$NUM.eqns" 2> /dev/null) + if [ $? -eq 124 ]; then + OUTPUT="did not terminate" + fi DIFF=$(echo "$OUTPUT" | diff - "$DIR/$NUM.soln") if [ ! -z "$DIFF" ]; then echo "==================" |