From: Stefano Lattarini Date: Wed, 18 Jan 2012 13:08:57 +0000 (+0100) Subject: Merge branch 'maint' X-Git-Tag: ng-0.5a~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4ba4e866e1842a7a54b9affceb355b55215c35c;p=thirdparty%2Fautomake.git Merge branch 'maint' * maint: cosmetics: move CheckListOfTests.am into tests/ tests: move all under the same hierarchy ('tests/' directory) gitlog-to-changelog: update from upstream changelog: don't cluster multiple entries under the same "date line" + Extra non-trivial edits: * tests/Makefile.am (XFAIL_TESTS): Update with the xfailing tests that were in 'lib/Automake/tests'. Add proper "FIXME" comment. --- b4ba4e866e1842a7a54b9affceb355b55215c35c diff --cc .gitignore index a1e84be39,f21915354..46607dcca --- a/.gitignore +++ b/.gitignore @@@ -47,20 -47,15 +47,20 @@@ Makefil /doc/amhello/install-sh /doc/amhello/missing /lib/Automake/Config.pm - /lib/Automake/tests/*.log - /lib/Automake/tests/*.trs -/tests/*.log -/tests/*.log-t -/tests/pm/*.log -/tests/pm/*.log-t -/tests/*.dir -/tests/*-p.test /tests/aclocal-1.* /tests/automake-1.* -/tests/defs -/tests/parallel-tests.am +/tests/defs-static +/tests/testsuite-part.am +/tests/*-w.tap +/tests/*-w.test +/tests/*.dir +/tests/*.log +/tests/*.trs ++/tests/pm/*.log ++/tests/pm/*.trs +cscope.files +cscope.in.out +cscope.out +cscope.po.out tags TAGS diff --cc tests/Makefile.am index 5d5c25419,eab45dcea..5696b44d6 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@@ -17,168 -17,125 +17,180 @@@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# Run the tests with the shell detected at configure time. +LOG_COMPILER = $(SHELL) + - TEST_EXTENSIONS = .test .tap ++TEST_EXTENSIONS = .pl .test .tap +TEST_LOG_COMPILER = $(LOG_COMPILER) +TAP_LOG_COMPILER = $(LOG_COMPILER) ++PL_LOG_COMPILER = $(PERL) ++AM_PL_LOG_FLAGS = -Mstrict -I $(top_builddir)/lib -I $(top_srcdir)/lib -w + +TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/lib/tap-driver.sh + +AM_TAP_LOG_DRIVER_FLAGS = --merge --comments +## Avoid spurious TAP diagnostic. We use an awful indirection with a +## shell command substitution here, since the string needs to contain +## `#' characters, and these can't be escaped portably in a make macro +## definition. +## FIXME: this is quite inefficient though, as it adds one extra fork +## FIXME: per TAP test script; this is OK for the moment, since we have +## FIXME: few such scripts, but might become an issue in the future. +## Keep this in sync with the definition of $diag_string_ in tests/defs. +AM_TAP_LOG_DRIVER_FLAGS += --diagnostic-string `printf '\043%%\043\n'` + +EXTRA_DIST = ChangeLog-old + +TESTS = ## Will be updated later. + XFAIL_TESTS = \ all.test \ -auxdir2.test \ cond17.test \ -dist-auxfile.test \ -dist-auxfile-2.test \ gcj6.test \ +override-conditional-2.test \ java-nobase.test \ objext-pr10128.test \ pr8365-remake-timing.test \ lex-subobj-nodep.test \ remake-am-pr10111.test \ remake-m4-pr10111.test \ --txinfo5.test ++txinfo5.test \ ++## 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. ++pm/Cond2.pl \ ++pm/Cond3.pl \ ++pm/DisjCon2.pl \ ++pm/DisjCon3.pl \ ++pm/Version2.pl \ ++pm/Version3.pl -include $(srcdir)/parallel-tests.am +# Some testsuite-influential variables should be overridable from the +# test scripts, but not from the environment. +AM_TESTS_ENVIRONMENT = \ + for v in \ + me \ + required \ + am_using_tap \ + am_parallel_tests \ + am_test_prefer_config_shell \ + am_original_AUTOMAKE \ + am_original_ACLOCAL \ + ; do \ + eval test x"\$${$$v}" = x || unset $$v; \ + done; +# The `AM_TESTS_REEXEC=no' setting tells the tests not to needlessly +# re-execute themselves with the shell detected at configure time, since +# we are already running them under it explicitly in our setup (see e.g. +# the definition of TEST_LOG_COMPILER above). +AM_TESTS_ENVIRONMENT += AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC; +# We want warning messages and explanations for skipped tests to go to +# the console if possible, so set up `stderr_fileno_' properly. +AM_TESTS_FD_REDIRECT = 9>&2 +AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_; -$(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am - $(AM_V_GEN)(cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@ +# Hand-written tests. -$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am - $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'` \ - && sed 's|^\. \./defs.*|parallel_tests=yes; &|' \ - < $(srcdir)/$$input >$@ \ - && chmod a+rx $@ +include $(srcdir)/list-of-tests.mk -MAINTAINERCLEANFILES = $(parallel_tests) +TESTS += $(handwritten_TESTS) +EXTRA_DIST += $(handwritten_TESTS) -# Some testsuite-influential variables should be overridable from the -# test scripts, but not from the environment. -TESTS_ENVIRONMENT = \ - test x"$$me" = x || unset me; \ - test x"$$required" = x || unset required; \ - test x"$$parallel_tests" = x || unset parallel_tests; +# Automatically-generated tests wrapping hand-written ones. +# Also, automatically-computed dependencies for tests. -TEST_EXTENSIONS = .pl .test +include $(srcdir)/testsuite-part.am -PL_LOG_COMPILER = $(PERL) -AM_PL_LOG_FLAGS = -Mstrict -I $(top_builddir)/lib -I $(top_srcdir)/lib -w +TESTS += $(generated_TESTS) +EXTRA_DIST += $(generated_TESTS) -include $(srcdir)/list-of-tests.mk +$(srcdir)/testsuite-part.am: + $(AM_V_at)rm -f testsuite-part.tmp $@ + $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \ + --srcdir $(srcdir) > testsuite-part.tmp + $(AM_V_at)chmod a-w testsuite-part.tmp + $(AM_V_at)mv -f testsuite-part.tmp $@ +EXTRA_DIST += gen-testsuite-part + +$(generated_TESTS) $(srcdir)/testsuite-part.am: \ + gen-testsuite-part list-of-tests.mk Makefile.am $(handwritten_TESTS) -TESTS = $(handwritten_TESTS) $(parallel_tests) - -# FIXME: make these automatically computed once we are merged into -# FIXME: the `testsuite-work' branch. -depcomp4.log: libtool-macros.log -depcomp7.log: libtool-macros.log -depcomp8b.log: libtool-macros.log -extradep2.log: libtool-macros.log -fort5.log: libtool-macros.log -instdir-ltlib.log: libtool-macros.log -instfail-libtool.log: libtool-macros.log -ldadd.log: libtool-macros.log -ldflags.log: libtool-macros.log -libobj13.log: libtool-macros.log -libtoo10.log: libtool-macros.log -libtoo11.log: libtool-macros.log -libtool.log: libtool-macros.log -libtool2.log: libtool-macros.log -libtool3.log: libtool-macros.log -libtool5.log: libtool-macros.log -libtool6.log: libtool-macros.log -libtool7.log: libtool-macros.log -libtool8.log: libtool-macros.log -libtool9.log: libtool-macros.log -listval.log: libtool-macros.log -ltcond.log: libtool-macros.log -ltcond2.log: libtool-macros.log -ltconv.log: libtool-macros.log -ltdeps.log: libtool-macros.log -ltinit.log: libtool-macros.log -ltinstloc.log: libtool-macros.log -ltlibobjs.log: libtool-macros.log -ltlibsrc.log: libtool-macros.log -ltorder.log: libtool-macros.log -nobase-libtool.log: libtool-macros.log -pr211.log: libtool-macros.log -pr300-ltlib.log: libtool-macros.log -pr307.log: libtool-macros.log -pr401b.log: libtool-macros.log -pr72.log: libtool-macros.log -reqd2.log: libtool-macros.log -silent3.log: libtool-macros.log -silent4.log: libtool-macros.log -silent9.log: libtool-macros.log -stdlib2.log: libtool-macros.log -strip3.log: libtool-macros.log -subobj9.log: libtool-macros.log -suffix10.log: libtool-macros.log -suffix2.log: libtool-macros.log -suffix5.log: libtool-macros.log -suffix8.log: libtool-macros.log -vala.log: libtool-macros.log -vala1.log: libtool-macros.log -vala2.log: libtool-macros.log -vala3.log: libtool-macros.log -vala4.log: libtool-macros.log -vala5.log: libtool-macros.log - -# FIXME: make these automatically computed once we are merged into -# FIXME: the `testsuite-work' branch. -gettext.log: gettext-macros.log -gettext2.log: gettext-macros.log -gettext3.log: gettext-macros.log -subcond.log: gettext-macros.log - -EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS) +# Static dependencies valid for each test case. +check_SCRIPTS = aclocal-$(APIVERSION) automake-$(APIVERSION) +check_DATA = defs defs-static plain-functions.sh tap-functions.sh +EXTRA_DIST += tap-functions.sh plain-functions.sh +# Few more static dependencies. distcheck-missing-m4.log distcheck-outdated-m4.log: distcheck-hook-m4.am EXTRA_DIST += distcheck-hook-m4.am -# Each test case depends on defs, aclocal, and automake. -check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION) +# Keep in sync with AC_SUBST'd stuff in defs-static.in. +do_subst = sed \ + -e 's|@abs_srcdir[@]|$(abs_srcdir)|g' \ + -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \ + -e 's|@abs_builddir[@]|$(abs_builddir)|g' \ + -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \ + -e 's|@prefix[@]|$(prefix)|g' \ + -e 's|@amdir[@]|$(amdir)|g' \ + -e 's|@bindir[@]|$(bindir)|g' \ + -e 's|@datadir[@]|$(datadir)|g' \ + -e 's|@docdir[@]|$(docdir)|g' \ + -e 's|@automake_acdir[@]|$(automake_acdir)|g' \ + -e 's|@system_acdir[@]|$(system_acdir)|g' \ + -e 's|@scriptdir[@]|$(scriptdir)|g' \ + -e 's|@pkgvdatadir[@]|$(pkgvdatadir)|g' \ + -e 's|@host_alias[@]|$(host_alias)|g' \ + -e 's|@build_alias[@]|$(build_alias)|g' \ + -e 's|@APIVERSION[@]|$(APIVERSION)|g' \ + -e 's|@PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|g' \ + -e 's|@SHELL[@]|$(SHELL)|g' \ + -e 's|@PERL[@]|$(PERL)|g' \ + -e 's|@EGREP[@]|$(EGREP)|g' \ + -e 's|@FGREP[@]|$(FGREP)|g' \ + -e 's|@TEX[@]|$(TEX)|g' \ + -e 's|@MODIFICATION_DELAY[@]|$(MODIFICATION_DELAY)|g' \ + -e 's|@am_AUTOCONF[@]|$(am_AUTOCONF)|g' \ + -e 's|@am_AUTOM4TE[@]|$(am_AUTOM4TE)|g' \ + -e 's|@am_AUTORECONF[@]|$(am_AUTORECONF)|g' \ + -e 's|@am_AUTOHEADER[@]|$(am_AUTOHEADER)|g' \ + -e 's|@am_AUTOUPDATE[@]|$(am_AUTOUPDATE)|g' \ + -e 's|@sh_errexit_works[@]|$(sh_errexit_works)|g' \ + -e 's|@configure_input[@]|Generated from $@.in. DO NOT EDIT BY HAND!|' + +defs-static: defs-static.in + $(AM_V_at)rm -f $@ $@-t + $(AM_V_GEN)$(do_subst) $(srcdir)/defs-static.in >$@-t + $(AM_V_at) : Sanity check on the substitutions; \ + if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@' $@-t; then \ + echo "$@ contains unexpanded substitution (see lines above)"; \ + exit 1; \ + fi + $(AM_V_at)chmod a-w $@-t && mv -f $@-t $@ +EXTRA_DIST += defs-static.in +CLEANFILES = defs-static + +# If two test scripts have the same basename, they will end up sharing +# the same log file, leading to all sort of undefined and undesired +# behaviours. +check-no-repeated-test-name: + @LC_ALL=C; export LC_ALL; \ + lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \ + | sort | uniq -c | awk '($$1 > 1) { print }' \ + | sed 's/\.log$$//' | grep . >&2 \ + && { \ + echo $@: test names listed above are duplicated >&2; \ + exit 1; \ + }; : +check-local: check-no-repeated-test-name +.PHONY: check-no-repeated-test-name ## Checking the list of tests. - include $(top_srcdir)/CheckListOfTests.am + test_subdirs = . pm + include $(srcdir)/CheckListOfTests.am -maintainer-check-list-of-tests: $(parallel_tests) + +# Run the testsuite with the installed aclocal and automake. +installcheck-local: + am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check clean-local: clean-local-check .PHONY: clean-local-check diff --cc tests/list-of-tests.mk index b6b74d949,7585e2bc0..589f90e27 --- a/tests/list-of-tests.mk +++ b/tests/list-of-tests.mk @@@ -18,14 -17,24 +18,29 @@@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . + perl_TESTS = \ ++pm/Cond2.pl \ ++pm/Cond3.pl \ + pm/Condition.pl \ + pm/Condition-t.pl \ ++pm/DisjCon2.pl \ ++pm/DisjCon3.pl \ + pm/DisjConditions.pl \ + pm/DisjConditions-t.pl \ + pm/Version.pl \ ++pm/Version2.pl \ ++pm/Version3.pl \ + pm/Wrap.pl + # The order here is mostly alphabetical, with the deliberate exception # that tests having a high runtime (especially TAP tests that run various # checks sequentially) are listed early; this improves performance on # concurrent testsuite runs. handwritten_TESTS = \ get-sysconf.test \ + $(perl_TESTS) \ -self-check-env-sanitize.test \ -self-check-report.test \ -aclibobj.test \ +depmod.tap \ +instspc.tap \ aclocal.test \ aclocal3.test \ aclocal4.test \ diff --cc tests/pm/Cond2.pl index 94caa8976,000000000..94caa8976 mode 100644,000000..100644 --- a/tests/pm/Cond2.pl +++ b/tests/pm/Cond2.pl diff --cc tests/pm/Cond3.pl index e010e4f0b,000000000..e010e4f0b mode 100644,000000..100644 --- a/tests/pm/Cond3.pl +++ b/tests/pm/Cond3.pl diff --cc tests/pm/DisjCon2.pl index 37d886a73,000000000..37d886a73 mode 100644,000000..100644 --- a/tests/pm/DisjCon2.pl +++ b/tests/pm/DisjCon2.pl diff --cc tests/pm/DisjCon3.pl index c0e840dd1,000000000..c0e840dd1 mode 100644,000000..100644 --- a/tests/pm/DisjCon3.pl +++ b/tests/pm/DisjCon3.pl diff --cc tests/pm/Version2.pl index c1981a09a,000000000..c1981a09a mode 100644,000000..100644 --- a/tests/pm/Version2.pl +++ b/tests/pm/Version2.pl diff --cc tests/pm/Version3.pl index 7c45dc948,000000000..7c45dc948 mode 100644,000000..100644 --- a/tests/pm/Version3.pl +++ b/tests/pm/Version3.pl