tests: relax a test to cater to NetBSD make
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 17 Feb 2012 12:46:53 +0000 (13:46 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 17 Feb 2012 12:46:53 +0000 (13:46 +0100)
* tests/parallel-tests-empty-testlogs.test: When $(TESTS) is empty,
NetBSD 5.1 make ends up defining $(TESTS_LOGS) to ".log" rather than
to the empty string (as would be expected).  This behaviour was
causing a check in this test case to fail.  But that check was in
fact overly strict, since our recipes are smart enough to work
around the botched-up substitution.  Also, the failure wasn't a
regression from Automake 1.11, since that version too would have
triggered the same error with NetBSD 5.1 make.  So we just relax
the test a little to avoid extra noise in the testsuite.

tests/parallel-tests-empty-testlogs.test

index e73dae8..608299f 100755 (executable)
@@ -34,9 +34,18 @@ mkdir sub1 sub2
 
 cat > sub1/Makefile.am << 'END'
 TESTS =
-check-local:
+END
+
+# When $(TESTS) is empty, NetBSD 5.1 make ends up defining $(TESTS_LOGS)
+# to ".log" rather than to the empty string (as would be expected).
+# But our recipes are smart enough to work around such a botched-up
+# substitution, so let's not bother too much about it.
+if using_gmake; then
+  unindent >> sub1/Makefile.am << 'END'
+    check-local:
        echo $(TEST_LOGS) | grep . && exit 1; exit 0
 END
+fi
 
 cat > sub2/Makefile.am << 'END'
 TESTS = foo.test