changeset 1449:0de09d7f503d draft

Add VERBOSE=fail to "make tests", based on suggestion from Johan Bergstr?m.
author Rob Landley <rob@landley.net>
date Sat, 30 Aug 2014 13:03:40 -0500
parents 1d4ed4994b4c
children 0089cd84afea
files scripts/test/testing.sh
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/test/testing.sh	Mon Aug 25 22:01:11 2014 -0500
+++ b/scripts/test/testing.sh	Sat Aug 30 13:03:40 2014 -0500
@@ -7,6 +7,7 @@
 # The following environment variables enable optional behavior in "testing":
 #    DEBUG - Show every command run by test script.
 #    VERBOSE - Print the diff -u of each failed test case.
+#              If equal to "fail", stop after first failed test.
 #    SKIP - do not perform this test (this is set by "optionflag")
 #
 # The "testing" function takes five arguments:
@@ -83,6 +84,7 @@
     then
       echo "echo '$5' | $2"
       diff -u expected actual
+      [ "$VERBOSE" == fail ] && exit 1
     fi
   else
     echo "PASS: $NAME"