done
rm -f src/parser.ml src/parser.mli src/lexer.ml src/parser.conflicts
rm -f man/*.1 man/*.5
+ rm -f tests/*.log
# We don't delete src/goals because it is required to do builds.
# If you want to really delete it, use the maintainer-clean rule.
goal check () = : tests
-goal test (name) = : {
+goal test (name) = @{
t=`basename %name`
cd tests
- ../run ./$t
+ if ../run ./$t > $t.log 2>&1; then
+ start_green
+ echo -n "PASS: "
+ end_colour
+ echo $t
+ else
+ start_red
+ echo -n "FAIL: "
+ end_colour
+ echo $t
+ exit 1
+ fi
}
# XXX This doesn't actually do quoting XXX
echo -n "\"$1\""
}
+
+# For printing strings in different colours, use these functions.
+function start_red ()
+{
+ echo -ne "\x1b[1;31m"
+}
+
+function start_green ()
+{
+ echo -ne "\x1b[0;32m"
+}
+
+function end_colour ()
+{
+ echo -ne "\x1b[0m"
+}
+function end_color ()
+{
+ echo -ne "\x1b[0m"
+}