summaryrefslogtreecommitdiff
path: root/gen-testsuite-part
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-05-15 16:12:09 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-05-18 14:03:11 +0200
commit7b142a7b363a49be43ff861abc2dca5af9593f9d (patch)
treee744359ac6bccf1714314ffd1d548bd858960739 /gen-testsuite-part
parent8084ae1b520862e03201d3bddfe01f3c8d197d1c (diff)
downloadautomake-7b142a7b363a49be43ff861abc2dca5af9593f9d.tar.gz
tests: use 'parallel-tests' Automake option by default
This will help our transition from 'serial-tests' to 'parallel-tests' as the default test suite driver enabled by a TESTS assignment in the input Makefile.am. Note that that change of default will only take place in master, though. * defs: Pass the 'parallel-tests' option to the AM_INIT_AUTOMAKE invocation in the created 'configure.ac' stub, unless the variable 'am_serial_tests' is set to "yes". Don't pay attention anymore to the 'am_parallel_tests' variable, that's obsolete now. * defs-static.in: Warn if the 'am_serial_tests' variable is set in the environment; conversely, don't warn anymore about 'am_parallel_tests' being set in the environment. * Makefile.am (AM_TESTS_ENVIRONMENT): Nullify the 'am_serial_tests' variable instead of the now-obsolete 'am_parallel_tests' one. * syntax-checks.mk (sc_tests_obsolete_variables): Also warn against uses of 'am_parallel_tests', which is now deprecated in favor of 'am_serial_tests'. Similarly, if a use of 'parallel_tests' is seen, suggest using 'am_serial_tests' instead, not 'am_parallel_tests'. * gen-testsuite-part: Now that we use the 'parallel-tests' by default in our tests, we need to completely change the logic and semantics of generation of sibling tests for those tests that check the Automake generated testsuite harness itself. Do that, and give a complete explanation of the new logic and semantics in the relevant comments. * t/README: Update. * Lots of test cases: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'gen-testsuite-part')
-rwxr-xr-xgen-testsuite-part33
1 files changed, 11 insertions, 22 deletions
diff --git a/gen-testsuite-part b/gen-testsuite-part
index a2db2d30b..34e10a83d 100755
--- a/gen-testsuite-part
+++ b/gen-testsuite-part
@@ -191,30 +191,19 @@ my %deps_extractor =
my %test_generators =
(
#
- # For each test script in the Automake testsuite that itself tests
- # features of the TESTS automake interface, define a sibling test
- # that does likewise, but with the option 'parallel-tests' enabled.
+ # Any test script in the Automake testsuite that checks features of
+ # the Automake-provided parallel testsuite harness might want to
+ # define a sibling test that does similar checks, but for the old
+ # serial testsuite harness instead.
#
- # A test is considered a candidate for sibling-generation if any
- # Makefile.am generated by it define the TESTS variable.
+ # Individual tests can request the creation of such a sibling by
+ # making the string "try-with-serial-tests" appear any line of the
+ # test itself.
#
- # Individual tests can prevent the creation of such a sibling by
- # explicitly setting the '$am_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.
- #
- parallel_testsuite_harness =>
+ serial_testsuite_harness =>
{
- line_matcher =>
- qr/(?:^|\s)TESTS\s*=/,
- line_rejecter =>
- qr/(?:^[^#]*\bparallel-tests\b)|\bam_parallel_tests=/,
- shell_setup_code =>
- 'am_parallel_tests=yes'
+ line_matcher => qr/\btry-with-serial-tests\b/,
+ shell_setup_code => 'am_serial_tests=yes',
},
#
# For each test script in the Automake testsuite that tests features
@@ -287,7 +276,7 @@ while (my ($k, $g) = each %test_generators)
{
my @wrapped_tests = grep {
line_match ($g->{line_matcher}, $_)
- && !line_match ($g->{line_rejecter}, $_)
+ && (!$g->{line_rejecter} || !line_match ($g->{line_rejecter}, $_))
} @all_tests;
foreach my $wrapped_test (@wrapped_tests)
{