Bug 539629 - lirasm: don't have two ways of running the tests (NJ-specific part). r=graydon.

--HG--
extra : convert_revision : c41f7c86b3cd3c2019189f941daa47f311959789
This commit is contained in:
Nicholas Nethercote 2010-01-21 12:59:56 +11:00
parent b1f006af09
commit 59368f63e2

View File

@ -2,6 +2,8 @@
set -eu
LIRASM=$1
TESTS_DIR=`dirname "$0"`/tests
for infile in "$TESTS_DIR"/*.in
@ -22,15 +24,15 @@ do
infile="--random 1000000 --optimize"
fi
if ./lirasm --execute $infile | tr -d '\r' > testoutput.txt && cmp -s testoutput.txt $outfile
if $LIRASM --execute $infile | tr -d '\r' > testoutput.txt && cmp -s testoutput.txt $outfile
then
echo "$0: output correct for $infile"
echo "TEST-PASS | lirasm | lirasm --execute $infile"
else
echo "$0: incorrect output for $infile"
echo "$0: === actual output ==="
echo "TEST-UNEXPECTED-FAIL | lirasm | lirasm --execute $infile"
echo "expected output"
cat $outfile
echo "actual output"
cat testoutput.txt
echo "$0: === expected output ==="
cat $outfile
fi
done