summaryrefslogtreecommitdiff
path: root/tools/test.sh
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-10-01 18:21:10 -0400
committerFreya Murphy <freya@freyacat.org>2024-10-01 18:21:10 -0400
commit4c6668f2b6a3714fb5d6c4262b0a4f2645c745cc (patch)
tree7fce59d279da38d9580176a204c6556f8f2bbbaa /tools/test.sh
parentfix sign extension, support branch delay slot (diff)
downloadmips-4c6668f2b6a3714fb5d6c4262b0a4f2645c745cc.tar.gz
mips-4c6668f2b6a3714fb5d6c4262b0a4f2645c745cc.tar.bz2
mips-4c6668f2b6a3714fb5d6c4262b0a4f2645c745cc.zip
make test script look nicer on failure
Diffstat (limited to '')
-rwxr-xr-xtools/test.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/test.sh b/tools/test.sh
index 2dcbf6a..b6c94ac 100755
--- a/tools/test.sh
+++ b/tools/test.sh
@@ -35,7 +35,10 @@ if [ $res = 0 ]; then
printf "\033[32mPASSED\033[0m\n"
else
printf "\033[31mFAILED\033[0m\n"
- diff <(echo $out) <(echo $rout)
+ if [ "$status" != "$rstatus" ]; then
+ printf "exit: $rstatus (should be $status)\n"
+ fi
+ diff -Nau <(printf "%s\n" "$out") <(printf "%s\n" "$rout")
fi
exit $res