]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'master' into ng/master
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 21 May 2012 22:31:20 +0000 (00:31 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 21 May 2012 22:31:20 +0000 (00:31 +0200)
* master:
  check: the parallel-tests driver is now the default
  ylwrap: preserve subdirectories in "#line" munging
  ylwrap: preparatory refactoring

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
21 files changed:
1  2 
automake.in
configure.ac
defs
doc/automake-ng.texi
lib/Automake/Options.pm
lib/am/check.am
lib/test-driver
lib/ylwrap
m4/init.m4
t/ax/tap-summary-aux.sh
t/ax/testsuite-summary-checks.sh
t/check8.sh
t/java-compile-run-flat.sh
t/java-compile-run-nested.sh
t/lex-line.sh
t/parallel-tests-many.sh
t/parallel-tests-no-color-in-log.sh
t/tap-doc2.sh
t/test-driver-is-distributed.sh
t/test-metadata-global-log.sh
t/yacc-line.sh

diff --cc automake.in
index bbda4393638e41d1dcd1c22bea67fd48355cc589,22fbbd764525b5a13ee85ac85d4ea6d68c7f7ed9..7596adad0126efa2389934129d26d71887cc41eb
@@@ -4562,12 -4764,10 +4562,10 @@@ sub handle_tests_dejagn
      $output_rules .= file_contents ('dejagnu', new Automake::Location);
  }
  
 -sub handle_per_suffix_test
 +sub handle_per_suffix_test($)
  {
 -  my ($test_suffix, %transform) = @_;
 -  my ($pfx, $generic, $am_exeext);
 +  my $test_suffix = shift;
-   my ($pfx, $parallel_tests_option);
-   prog_error ("called with 'parallel-tests' option not set")
-     unless $parallel_tests_option = option 'parallel-tests';
++  my $pfx;
    if ($test_suffix eq '')
      {
        $pfx = '';
        prog_error ("test suffix '$test_suffix' lacks leading dot")
          unless $test_suffix =~ m/^\.(.*)/;
        $pfx = uc ($1) . '_';
 -      $generic = 1;
 -      $am_exeext = exists $configure_vars{'EXEEXT'} ? 'am__EXEEXT'
 -                                                    : 'FALSE';
      }
    # The "test driver" program, deputed to handle tests protocol used by
-   # test scripts.  By default, it's assumed that no protocol is used,
-   # so we fall back to the old "parallel-tests" behaviour, implemented
-   # by the 'test-driver' auxiliary script.
+   # test scripts.  By default, it's assumed that no protocol is used, so
+   # we fall back to the old behaviour, implemented by the 'test-driver'
+   # auxiliary script.
    if (! var "${pfx}LOG_DRIVER")
      {
-       require_conf_file ($parallel_tests_option->{position}, FOREIGN,
-                         'test-driver');
+       require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
        define_variable ("${pfx}LOG_DRIVER",
                         "\$(SHELL) $am_config_aux_dir/test-driver",
                         INTERNAL);
@@@ -4632,12 -4846,19 +4629,19 @@@ sub handle_test
    if (var ('TESTS'))
      {
        push (@check_tests, 'check-TESTS');
 -      my $check_deps = "@check";
        $output_rules .= &file_contents ('check', new Automake::Location,
                                       COLOR => !! option 'color-tests',
-                                      PARALLEL_TESTS => !! option 'parallel-tests',
+                                      SERIAL_TESTS => !! option 'serial-tests',
 -                                       CHECK_DEPS => $check_deps);
 -
 -      # Tests that are known programs should have $(EXEEXT) appended.
 -      # For matching purposes, we need to adjust XFAIL_TESTS as well.
 -      append_exeext { exists $known_programs{$_[0]} } 'TESTS';
 -      append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
 -      if (var ('XFAIL_TESTS'));
 -
 -      if (! option 'serial-tests')
 +                                       CHECK_DEPS => "@check");
-       if (my $parallel_tests = option 'parallel-tests')
++      if (option 'serial-tests')
++        {
++          # Tests that are known programs should have $(EXEEXT) appended.
++          # For matching purposes, we need to adjust XFAIL_TESTS as well.
++          append_exeext { exists $known_programs{$_[0]} } 'TESTS';
++          append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
++          if (var ('XFAIL_TESTS'));
++        }
++      else
          {
          define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
          my $suff = '.test';
                      "invalid test extensions: @invalid_test_suffixes";
              }
            @test_suffixes = grep { is_valid_test_extension $_ } @test_suffixes;
 -        if ($handle_exeext)
 -          {
 -            unshift (@test_suffixes, $at_exeext)
 -              unless $test_suffixes[0] eq $at_exeext;
 -          }
 -        unshift (@test_suffixes, '');
 -
 -        transform_variable_recursively
 -          ('TESTS', 'TEST_LOGS', 'am__testlogs', 1, INTERNAL,
 -            sub {
 -              my ($subvar, $val, $cond, $full_cond) = @_;
 -              my $obj = $val;
 -              return $obj
 -                if $val =~ /^\@.*\@$/;
 -              $obj =~ s/\$\(EXEEXT\)$//o;
 -
 -              if ($val =~ /(\$\((top_)?srcdir\))\//o)
 -                {
 -                  msg ('error', $subvar->rdef ($cond)->location,
 -                       "using '$1' in TESTS is currently broken: '$val'");
 -                }
 -
 -              foreach my $test_suffix (@test_suffixes)
 -                {
 -                  next
 -                    if $test_suffix eq $at_exeext || $test_suffix eq '';
 -                  return substr ($obj, 0, length ($obj) - length ($test_suffix)) . '.log'
 -                    if substr ($obj, - length ($test_suffix)) eq $test_suffix;
 -                }
 -              my $base = $obj;
 -              $obj .= '.log';
 -                handle_per_suffix_test ('',
 -                                        OBJ => $obj,
 -                                        BASE => $base,
 -                                        SOURCE => $val);
 -              return $obj;
 -            });
 -
 -        my $nhelper=1;
 -        my $prev = 'TESTS';
 -        my $post = '';
 -        my $last_suffix = $test_suffixes[$#test_suffixes];
 -        my $cur = '';
 +          # It is *imperative* that the empty 'suffix goes last.
 +          # Otherwise, a declaration like "TESTS = all.test" would cause GNU
 +          # make to mistakenly try to build the 'all.log' and 'all.trs' files
 +          # from a non-existent 'all' program (because the Makefile contains
 +          # an explicit 'all' target) rather than from the 'all.test' script,
 +          # thus causing all sort of mishaps and confusion.
 +        push @test_suffixes, '';
          foreach my $test_suffix (@test_suffixes)
            {
 -            if ($test_suffix eq $last_suffix)
 -              {
 -                $cur = 'TEST_LOGS';
 -              }
 -            else
 -              {
 -                $cur = 'am__test_logs' . $nhelper;
 -              }
 -            define_variable ($cur,
 -              '$(' . $prev . ':' . $test_suffix . $post . '=.log)', INTERNAL);
 -            $post = '.log';
 -            $prev = $cur;
 -            $nhelper++;
 -            if ($test_suffix ne $at_exeext && $test_suffix ne '')
 -              {
 -                  handle_per_suffix_test ($test_suffix,
 -                                          OBJ => '',
 -                                          BASE => '$*',
 -                                          SOURCE => '$<');
 -              }
 +              handle_per_suffix_test ($test_suffix);
            }
 -        $clean_files{'$(TEST_LOGS)'} = MOSTLY_CLEAN;
 -        $clean_files{'$(TEST_LOGS:.log=.trs)'} = MOSTLY_CLEAN;
 +        $clean_files{'$(am__test_logs)'} = MOSTLY_CLEAN;
 +        $clean_files{'$(am__test_results)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_SUITE_LOG)'} = MOSTLY_CLEAN;
        }
-       else
-         {
-           # Tests that are known programs should have $(EXEEXT) appended.
-           # For matching purposes, we need to adjust XFAIL_TESTS as well.
-           append_exeext { exists $known_programs{$_[0]} } 'TESTS';
-           append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
-           if (var ('XFAIL_TESTS'));
-         }
      }
  }
  
diff --cc configure.ac
Simple merge
diff --cc defs
Simple merge
Simple merge
Simple merge
diff --cc lib/am/check.am
index 903dfc24747244c1ad57bf35bb8913c80e1be107,67b254ffbb07c18c379a42b24159e02563d9355a..45bc61567cb7577f92c743823d9a85b864447a16
@@@ -46,8 -46,10 +46,8 @@@ endif !%?COLOR
  
  .PHONY: check-TESTS
  
- if %?PARALLEL_TESTS%
+ if !%?SERIAL_TESTS%
  
 -include inst-vars.am
 -
  ## New parallel test driver.
  ##
  ## The first version of the code here was adapted from check.mk, which was
@@@ -367,7 -450,11 +367,9 @@@ recheck: all %CHECK_DEPS
  
  AM_RECURSIVE_TARGETS += check recheck
  
- else !%?PARALLEL_TESTS%
 -.PHONY: recheck
 -
+ else %?SERIAL_TESTS%
+ ## Obsolescent serial testsuite driver.
  
  check-TESTS: $(TESTS)
        @failed=0; all=0; xfail=0; xpass=0; skip=0; \
diff --cc lib/test-driver
Simple merge
diff --cc lib/ylwrap
Simple merge
diff --cc m4/init.m4
Simple merge
Simple merge
Simple merge
diff --cc t/check8.sh
Simple merge
Simple merge
Simple merge
diff --cc t/lex-line.sh
Simple merge
Simple merge
Simple merge
diff --cc t/tap-doc2.sh
Simple merge
index c6e83feb343cbe0838dfc75ada2b751b5158a100,88f7982e88d1397f811c4a14d7e969719439a3c6..23a4d18038bd12076c5e23dc1db1f978c18471bf
@@@ -57,10 -51,9 +51,9 @@@ EN
      .PHONY: test-top
  END
    unindent > tests/Makefile.am << END
-     AUTOMAKE_OPTIONS = $am_opts
      check-local: test-sub
      test-sub:
 -      echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver '
 +      echo ' ' \$(am__dist_common) ' ' | grep '[ /]$test_driver '
      TESTS = foo.test
      EXTRA_DIST = \$(TESTS)
  END
Simple merge
diff --cc t/yacc-line.sh
Simple merge