summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-06-29 02:39:04 -0700
committerEric Wong <normalperson@yhbt.net>2009-06-29 04:07:01 -0700
commitd7b3fb8053315c2ecf4d66199b028df5070e1ab8 (patch)
treedb046d5cfe86b322dda1850c52c8d3134cad001d
parent7cbdf6ba4c3463dfc1cac5cb01d4241c02be7fde (diff)
-rw-r--r--GNUmakefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 1145143..6291f93 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -70,17 +70,18 @@ $(slow_tests): $(test_prefix)/.stamp
         @$(MAKE) $(shell $(awk_slow) $@)
 
 TEST_OPTS = -v
-TEST_OPTS = -v
+check_test = grep '0 failures, 0 errors' $(t) >/dev/null
 ifndef V
        quiet_pre = @echo '* $(arg)$(extra)';
-       quiet_post = >$(t) 2>&1
+       quiet_post = >$(t) 2>&1 && $(check_test)
 else
        # we can't rely on -o pipefail outside of bash 3+,
        # so we use a stamp file to indicate success and
        # have rm fail if the stamp didn't get created
        stamp = $@$(log_suffix).ok
        quiet_pre = @echo $(ruby) $(arg) $(TEST_OPTS); ! test -f $(stamp) && (
-       quiet_post = && > $(stamp) )>&2 | tee $(t); rm $(stamp) 2>/dev/null
+       quiet_post = && > $(stamp) )2>&1 | tee $(t); \
+         rm $(stamp) 2>/dev/null && $(check_test)
 endif
 run_test = $(quiet_pre) setsid $(ruby) -w $(arg) $(TEST_OPTS) $(quiet_post) || \
   (sed "s,^,$(extra): ," >&2 < $(t); exit 1)