ref: 1e8a7b492adbf99def7348f6161f5fdbdc18801a
parent: 2ec461200f2fc4ae68d8b86f4f193c9e03a00b63
author: Ori Bernstein <[email protected]>
date: Sat Jun 30 13:14:29 EDT 2012
Improve test output. Finish with a summary of all failed tests.
--- a/test/test.sh
+++ b/test/test.sh
@@ -3,6 +3,7 @@
export MC=../8/8m
export MU=../util/muse
export CC=cc
+NFAILURES=0
function use {
rm -f $1 $1.o $1.s $1.use
@@ -20,6 +21,8 @@
function prints {
if [ `./$1` -ne $2 ]; then
echo "FAIL: $1"
+ FAILED="$FAILED $1"
+ NFAILED=$[$NFAILED + 1]
else
echo "PASS: $1"
fi
@@ -32,9 +35,13 @@
echo "PASS: $1"
else
echo "FAIL: $1"
+ FAILED="$FAILED $1"
+ NFAILED=$[$NFAILED + 1]
fi
else
echo "FAIL: $1"
+ FAILED="$FAILED $1"
+ NFAILED=$[$NFAILED + 1]
fi
}
@@ -66,3 +73,4 @@
P) prints $tst $val ;;
esac
done
+echo "FAILURES ($NFAILED)": $FAILED