From: Stefano Lattarini Date: Sat, 27 Oct 2012 08:57:57 +0000 (+0200) Subject: Merge branch 'maint' into ng/master X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae1486dcdefb2bab1e323c2c88b42d9094daca52;p=thirdparty%2Fautomake.git Merge branch 'maint' into ng/master * 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 --- ae1486dcdefb2bab1e323c2c88b42d9094daca52 diff --cc Makefile.am index 656ebac78,fc37f44dc..f72784343 --- a/Makefile.am +++ b/Makefile.am @@@ -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 gen-testsuite-part index da80f8124,6ed193186..0e862ac4a --- a/gen-testsuite-part +++ b/gen-testsuite-part @@@ -272,20 -270,40 +272,38 @@@ print <{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 t/parallel-tests-empty.sh index 0960da546,146f1fc30..bbcbf871f --- a/t/parallel-tests-empty.sh +++ b/t/parallel-tests-empty.sh @@@ -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 +: diff --cc t/remake-subdir-grepping.sh index fc249b8cc,0cce72e05..c7b199e34 --- a/t/remake-subdir-grepping.sh +++ b/t/remake-subdir-grepping.sh @@@ -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 :