automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI 1/2] {maint} testsuite: allow tests to avoid the use of 'parallel-t


From: Stefano Lattarini
Subject: [FYI 1/2] {maint} testsuite: allow tests to avoid the use of 'parallel-tests' option
Date: Fri, 20 May 2011 23:25:30 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

* 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                |    9 +++++++++
 tests/README             |    5 ++++-
 tests/gen-parallel-tests |   11 +++++++++--
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 53dd132..52a729b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2011-05-20  Stefano Lattarini  <address@hidden>
 
+       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  <address@hidden>
+
        tests/README: update obsoleted advice
        * tests/README (Section "Writing test cases" subsection "Do"):
        Do not suggest to use the `*-p.test' pattern for the names of
diff --git a/tests/README b/tests/README
index 8e4d3e4..9680a54 100644
--- a/tests/README
+++ b/tests/README
@@ -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
diff --git a/tests/gen-parallel-tests b/tests/gen-parallel-tests
index 39f5d1e..451fb77 100755
--- a/tests/gen-parallel-tests
+++ b/tests/gen-parallel-tests
@@ -19,6 +19,14 @@
 # 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 |
 {
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]