summaryrefslogtreecommitdiff
path: root/impl/test
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-10-30 21:30:53 +1100
committerCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-10-30 21:30:53 +1100
commit3d372ecf513c951675602286b296f7af520bb3cf (patch)
tree87b3a75507c64e202ffc6d83028e9da1821412c9 /impl/test
parent093a35f07986ecfac8c43d053445e8417c7c2139 (diff)
parent6a4786bde976e9a023c7f65a395384d214c5102c (diff)
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'impl/test')
-rw-r--r--impl/test/run5
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 "=================="