summaryrefslogtreecommitdiff
path: root/impl/test/run
diff options
context:
space:
mode:
Diffstat (limited to 'impl/test/run')
-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 "=================="