]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'maint' into ng/master
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 27 Oct 2012 08:57:57 +0000 (10:57 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 27 Oct 2012 09:14:37 +0000 (11:14 +0200)
* maint:
  sync: update files from upstream with "make fetch"
  maintcheck: remove an obsolescent check
  tests: rename some tests to more expressive names, again
  tests: remove an obsolescent grepping check
  tests: merge two tests on automatic remake functionality
  tests: rename some test to more expressive names
  news: 'compile' supports libfoo.a naming when wrapping Microsoft tools
  tests: ensure generation of wrapper tests matching multiple conditions
  tests: simplify a loop in gen-testsuite-part
  compile: support libfoo.a naming when wrapping Microsoft tools
  NEWS: fix wording and grammaros, re-wrap text accordingly
  cosmetics: fix typo in 'lib/depcomp' comments

+ Extra non-trivial changes:

* Makefile.am (XFAIL_TESTS): Rename 't/pr8365-remake-timing.sh' to
't/remake-timing-bug-pr8365.sh' (in master, this was done for in
file 't/list-of-tests.mk', but that is gone in ng/master).
* t/parallel-tests-empty-tests.sh: Merge ...
* t/parallel-tests-empty.sh: ... into this, to reduce confusion and
code duplication.
* t/remake-maintainer-mode.sh: Delete: Automake-NG don't support
AM_MAINTAINER_MODE (see commit v1.12.2-790-g00a3837).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
25 files changed:
1  2 
Makefile.am
NEWS
gen-testsuite-part
lib/compile
lib/depcomp
t/parallel-tests-basics.sh
t/parallel-tests-concurrency-2.sh
t/parallel-tests-concurrency.sh
t/parallel-tests-empty.sh
t/parallel-tests-generated-and-distributed.sh
t/parallel-tests-recheck.sh
t/remake-after-acinclude-m4.sh
t/remake-after-aclocal-m4.sh
t/remake-after-configure-ac.sh
t/remake-after-makefile-am.sh
t/remake-include-aclocal.sh
t/remake-include-configure.sh
t/remake-include-makefile.sh
t/remake-makefile-intree.sh
t/remake-makefile-vpath.sh
t/remake-mild-stress.sh
t/remake-not-after-make-dist.sh
t/remake-subdir-grepping.sh
t/remake-subdir3.sh
t/remake-timing-bug-pr8365.sh

diff --cc Makefile.am
index 656ebac782f9aa2b600cb3b23d58c3dbb4ae70e0,fc37f44dcce52fb39d69470701c834c84972eaca..f727843439806beab8469412585620d0ef998a63
@@@ -294,66 -330,7 +294,66 @@@ AM_TAP_LOG_DRIVER_FLAGS = --merg
  
  EXTRA_DIST += t/README t/ax/is t/ax/is_newest
  
 -TESTS = ## Will be updated later.
 +# Hand-written tests for stuff in 'contrib/'.
 +include $(srcdir)/contrib/t/local.am
 +
 +# All tests, both hand-written and autogenerated.
 +# IMPORTANT: This assumes that the autogenerated tests are placed
 +#            in the $(srcdir) as well!
 +all_TESTS = \
 +  $(wildcard $(srcdir)/t/*.sh) \
 +  $(wildcard $(srcdir)/t/*.tap) \
 +  $(wildcard $(srcdir)/t/pm/*.pl)
 +
 +# This is to ensure longer-running tests will be run earlier, which is
 +# useful when running the testsuite in parallel on multicore machines.
 +# Here too we assume that the autogenerated tests are placed in $(srcdir).
 +long_running_TESTS = \
 +  $(srcdir)/t/dist-many.sh \
 +  $(srcdir)/t/parallel-tests-many.sh \
 +  $(srcdir)/t/add-missing.tap \
 +  $(srcdir)/t/instspc.tap \
 +  $(wildcard $(srcdir)/t/depcomp-*.tap) \
 +  $(wildcard $(srcdir)/t/*libtool*.sh) \
 +  $(wildcard $(srcdir)/t/lt*.sh) \
 +  $(wildcard $(srcdir)/t/remake*.sh)
 +
 +TESTS = \
 +  $(long_running_TESTS) \
 +  $(filter-out $(long_running_TESTS), $(all_TESTS)) \
 +  $(contrib_TESTS)
 +
 +EXTRA_DIST += $(TESTS)
 +
 +# FIXME: this "expected failures" are in truth an hack used to
 +# FIXME: to verify that some incorrect usages of our perl libraries
 +# FIXME: raise an error.  We should find a cleaner way to check that.
 +perl_fake_XFAIL_TESTS = \
 +  t/pm/Cond2.pl \
 +  t/pm/Cond3.pl \
 +  t/pm/DisjCon2.pl \
 +  t/pm/DisjCon3.pl \
 +  t/pm/Version2.pl \
 +  t/pm/Version3.pl
 +
 +XFAIL_TESTS = \
 +  t/all.sh \
 +  t/override-suggest-local.sh \
 +  t/comments-in-var-def.sh \
 +  t/cond17.sh \
 +  t/dist-srcdir2.sh \
 +  t/gcj6.sh \
 +  t/override-conditional-2.sh \
 +  t/dist-pr109765.sh \
 +  t/instdir-cond2.sh \
 +  t/interp3.sh \
 +  t/java-nobase.sh \
 +  t/objext-pr10128.sh \
-   t/pr8365-remake-timing.sh \
++  t/remake-timing-bug-pr8365.sh \
 +  t/remake-am-pr10111.sh \
 +  t/remake-m4-pr10111.sh \
 +  t/var-undef-append.sh \
 +  $(perl_fake_XFAIL_TESTS)
  
  # Some testsuite-influential variables should be overridable from the
  # test scripts, but not from the environment.
diff --cc NEWS
Simple merge
index da80f8124ff3a31f6bb824ab2ef1bb2d2807d234,6ed19318665b82013ff5c97c2cde26dafa4bb07d..0e862ac4af5c6945f5d75148bf7d2f6ba7100e70
@@@ -272,20 -270,40 +272,38 @@@ print <<EOF
  
  EOF
  
- # FIXME: the following is not really right, since cannot compose wrapping
- # of tests matching more than one condition.  Still, there should be no
- # such test at the moment, so the limitation is (temporarily) acceptable.
- while (my ($k, $g) = each %test_generators)
+ # A test script '$test' can possibly match more than one condition, so
+ # for each tests we need to keep a list of generated wrapper tests.
+ # Since what defines these wrapper scripts is the set of initializations
+ # that are issued before sourcing the original, wrapped tests, these
+ # initializations is what we put in our list entries.
+ # The list will be saved in the hash entry '$wrapper_setups{$test}'.
+ my %wrapper_setups = ();
+ foreach my $test (@all_tests)
    {
-     my @wrapped_tests = grep {
-       line_match ($g->{line_matcher}, $_)
-         && (!$g->{line_rejecter} || !line_match ($g->{line_rejecter}, $_))
-     } @all_tests;
-     foreach my $wrapped_test (@wrapped_tests)
+     my @setups = ('');
+     foreach my $x (values %test_generators)
+     {
+       next
+         if not line_match $x->{line_matcher}, $test;
+       next
+         if $x->{line_rejecter} and line_match $x->{line_rejecter}, $test;
+       @setups = map { ($_, "$_\n$x->{shell_setup_code}") } @setups;
+     }
+     @setups = grep { $_ ne '' } @setups;
+     $wrapper_setups{$test} = \@setups if @setups;
+   }
+ # And now create all the wrapper tests.
+ while (my ($wrapped_test, $setup_list) = each %wrapper_setups)
+   {
+     (my $base = $wrapped_test) =~ s/\.([^.]*)$//;
+     my $suf = $1 or die "$me: test '$wrapped_test' lacks a suffix\n";
+     my $count = 0;
+     foreach my $setup (@$setup_list)
        {
-         (my $base = $wrapped_test) =~ s/\.([^.]*)$//;
-         my $suf = $1 or die "$me: test '$wrapped_test' lacks a suffix\n";
-         my $wrapper_test =  "$srcdir/$base-w.$suf";
+         $count++;
+         my $wbase = "$base-w" . ($count > 1 ? $count : '');
 -        my $wrapper_test =  "$wbase.$suf";
 -        # Register wrapper test as "autogenerated".
 -        push @generated_tests, $wrapper_test;
++        my $wrapper_test =  "$srcdir/$wbase.$suf";
          # Create wrapper test.
          atomic_write $wrapper_test,
                       sub { write_wrapper_script $_[0], $wrapped_test,
diff --cc lib/compile
Simple merge
diff --cc lib/depcomp
Simple merge
Simple merge
Simple merge
Simple merge
index 0960da54669666579dcfab678429318c1fd7bb9f,146f1fc3028704c467a072116f739c2362409287..bbcbf871fe61cda73096fc2d385d0629c28ce8a4
@@@ -53,33 -32,11 +53,38 @@@ $ACLOCA
  $AUTOCONF
  $AUTOMAKE -a
  
- no_test_has_run ()
 -./configure
 -$MAKE check >stdout || { cat stdout; exit 1; }
 -cat stdout
 -for x in TOTAL PASS FAIL XPASS FAIL SKIP ERROR; do
 -  grep "^# $x: *0$" stdout
++no_test_run ()
 +{
-   ls -1 *.log | grep -v '^test-suite\.log$' | grep . && exit 1
-   grep '^# TOTAL: *0$' test-suite.log
++  $MAKE check ${1+"$@"} >stdout || { cat stdout; exit 1; }
++  cat stdout
++  ls *.log | grep -v '^test-suite\.log$' | grep . && exit 1
++  grep '^# TOTAL: *0$' test-suite.log || exit 1
++  for x in TOTAL PASS FAIL XPASS FAIL SKIP ERROR; do
++    grep "^# $x: *0$" stdout || exit 1
++  done
 +  :
 +}
 +
 +for vpath in : false; do
 +  if $vpath; then
 +    mkdir build
 +    cd build
 +    srcdir=..
 +  else
 +    srcdir=.
 +  fi
 +  $srcdir/configure
 +  cd sub1
-   $MAKE check VERBOSE=yes
-   no_test_has_run
++  no_test_run
++  no_test_run VERBOSE=yes
 +  cd ../sub2
-   $MAKE check VERBOSE=yes TESTS=''
-   no_test_has_run
++  no_test_run TESTS=
++  no_test_run VERBOSE=yes TESTS=' '
 +  cd ..
++  # Sanity check.
 +  $MAKE check
 +  cat sub2/foo.log
-   $MAKE distclean
 +  cd $srcdir
  done
  
 -exit 0
 +:
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index fc249b8ccdd64dfaa4515999fcc6984dcb2adf03,0cce72e052056a1137a8ec0cc487fcfc951ef56d..c7b199e3403cb28521087dcb9508998ff71dd68e
@@@ -33,9 -33,7 +33,10 @@@ mkdir su
  $ACLOCAL
  $AUTOMAKE
  
 -grep '^Makefile' sub/Makefile.in
 +grep -i makefile sub/Makefile.in # For debugging.
 +grep '^am\.relpath\.makefile = Makefile$' sub/Makefile.in
 +grep '^am\.relpath\.makefile\.in = \$(srcdir)/Makefile\.in$' sub/Makefile.in
 +grep '^am\.relpath\.makefile\.am = \$(srcdir)/Makefile\.am$' sub/Makefile.in
+ grep '\$(AUTOMAKE).* sub/Makefile' sub/Makefile.in
  
  :
Simple merge
Simple merge