]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
testsuite: allow tests to avoid the use of 'parallel-tests' option
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 20 May 2011 20:31:40 +0000 (22:31 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 20 May 2011 21:21:42 +0000 (23:21 +0200)
* tests/gen-parallel-tests: Do not generate "siblings" for tests
that explicitly define the `parallel_tests', whether to "yes" or
to any other value.  Extend heading comments to give a rationale
for this behaviour.
* tests/README: Update.

ChangeLog
tests/README
tests/gen-parallel-tests

index 53dd132d73e71881b2583c0a87e3e1dcd26275f6..52a729bb9d9650a84f64cfbde5615fe4eb7fa4a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-05-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       testsuite: allow tests to avoid the use of 'parallel-tests' option
+       * tests/gen-parallel-tests: Do not generate "siblings" for tests
+       that explicitly define the `parallel_tests', whether to "yes" or
+       to any other value.  Extend heading comments to give a rationale
+       for this behaviour.
+       * tests/README: Update.
+
 2011-05-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests/README: update obsoleted advice
index 8e4d3e4cf025f6249e77c33fcf643189278ad87c..9680a5472e8f7a4d012e5cc48d246116adf1873c 100644 (file)
@@ -108,7 +108,10 @@ Do
   For tests that use the `parallel-tests' Automake option, set the shell
   variable `parallel_tests' to "yes" before including ./defs.  Also,
   do not use for them a name that ends in `-p.test', since that would
-  risk to clash with automatically-generated tests.
+  risk to clash with automatically-generated tests.  For tests that are
+  *not* meant to work with the `parallel-tests' Automake option (these
+  should be very very few), set the shell variable `parallel_tests' to
+  "no" before including ./defs.
 
   ./defs sets a skeleton configure.in.  If possible, append to this
   file.  In some cases you'll have to overwrite it, but this should
index 39f5d1e2f677906fb7ef2be4ab7bc6d55302179b..451fb7772340666b6ede6cad0c2b54195a475c0a 100755 (executable)
 # For each test in the TESTS list in this Makefile.am file, that itself
 # tests features of the TESTS automake interface, generate a sibling
 # test that does likewise, but with the option `parallel-tests' enabled.
+# Individual tests can prevent the creation of such a sibling by
+# explicitly setting the `$parallel_tests' variable to either "yes" or
+# "no".  The rationale for this is that if the variable is set to "yes",
+# the test already uses the `parallel-tests' option, so that a sibling
+# would be just a duplicate; while if the variable is set to "no", the
+# test doesn't support, or is not meant to run with, the `parallel-tests'
+# option, and forcing it to do so in the sibling would likely cause a
+# spurious failure.
 
 set -e
 
@@ -31,8 +39,7 @@ grep -v '.-p\.test' |
 LC_ALL=C sort -u |
 while read tst; do
   if grep '^[^#]*parallel-tests' $tst >/dev/null \
-     || grep "parallel_tests=yes" $tst >/dev/null \
-     || grep "parallel_tests=['\"]yes" $tst >/dev/null
+     || grep "parallel_tests=" $tst >/dev/null
   then :; else echo $tst; fi;
 done |
 {