check.mak: add 'make foo/bar.check-norepeat' option
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 7 Mar 2012 12:33:13 +0000 (12:33 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 7 Mar 2012 12:33:13 +0000 (12:33 +0000)
When debugging specific test case failures, we dont' want the
test to be run again with GST_DEBUG=*:2, that just clutters
the log and makes everything more complicated.

Add foo/bar.check-norepeat target to run the test exactly
once and stop when it fails.

check.mak

index 30487f1..bc44620 100644 (file)
--- a/check.mak
+++ b/check.mak
@@ -24,6 +24,12 @@ LOOPS = 10
        CK_DEFAULT_TIMEOUT=20                                   \
        $*
 
+# just like 'check', but don't run it again if it fails (useful for debugging)
+%.check-norepeat: %
+       @$(TESTS_ENVIRONMENT)                                   \
+       CK_DEFAULT_TIMEOUT=20                                   \
+       $*
+
 # run any given test in a loop
 %.torture: %
        @for i in `seq 1 $(LOOPS)`; do                          \
@@ -152,7 +158,8 @@ help:
        @echo
        @echo "make check                         -- run all checks"
        @echo "make torture                       -- run all checks $(LOOPS) times"
-       @echo "make (dir)/(test).check            -- run the given check once"
+       @echo "make (dir)/(test).check            -- run the given check once, repeat with GST_DEBUG=*:2 if it fails"
+       @echo "make (dir)/(test).check-norepeat   -- run the given check once, but don't run it again if it fails"
        @echo "make (dir)/(test).forever          -- run the given check forever"
        @echo "make (dir)/(test).torture          -- run the given check $(LOOPS) times"
        @echo