summaryrefslogtreecommitdiff
path: root/impl/test/run
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-11-02 11:06:41 +1100
committerCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-11-02 11:06:41 +1100
commitea660a9528cea35b7971dfc405e464cbddb2d1d0 (patch)
treec1989f3d1bd79ac8325326f00ba3cb321f0a3911 /impl/test/run
parenta8472ef1867418b94116324531b3587e0e0e7363 (diff)
parent1c3d68659fb6341e7a72d563448380a7ffae8c2e (diff)
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Conflicts: tex/thesis/contribution/contribution.tex
Diffstat (limited to 'impl/test/run')
-rw-r--r--impl/test/run6
1 files changed, 4 insertions, 2 deletions
diff --git a/impl/test/run b/impl/test/run
index 169edda..d15fb68 100644
--- a/impl/test/run
+++ b/impl/test/run
@@ -7,15 +7,17 @@ FAILED=0
echo "Testing binary: $1 in directory $DIR"
while [ -f "$DIR/$NUM.eqns" ]
do
+ cat "$DIR/$NUM.soln" | sort > "/tmp/$NUM.soln.tmp"
+ mv "/tmp/$NUM.soln.tmp" "$DIR/$NUM.soln" 2> /dev/null
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")
+ DIFF=$(echo "$OUTPUT" | sort | diff - "$DIR/$NUM.soln")
if [ ! -z "$DIFF" ]; then
echo "=================="
echo "Test #$NUM failed:"
- echo "$OUTPUT" | sdiff - "$DIR/$NUM.soln"
+ echo "$OUTPUT" | sort | sdiff - "$DIR/$NUM.soln"
echo
FAILED=$(($FAILED + 1))
fi