On Monday 08 August 2011, Stefano Lattarini wrote: > * lib/am/check.am (am__TEST_BASES): Removed, it's role taken > over by ... > (am__set_TESTS_bases): ... these new variable. > ($(TEST_SUITE_LOG): Use it, to avoid VPATH rewrite issues. > * automake.in (handle_tests): Update the code for the cleanup > of the `.trs' file to use `$(TEST_LOGS)' instead of > `$(am__TEST_BASES)'. > * tests/test-harness-vpath-rewrite.test: New test, better > exposing the problem fixed by this change > * tests/Makefile.am (TESTS): Add it. > * tests/test-trs-basic.test: Update and extend. > And I've also pushed the attached patch to fix a stupid blunder in my previous change. It's never a good idea to push a non-trivial patch late at night ...
Thanks, and sorry for the noise (again), Stefano
From 232dcc6d2e6c80af70eb72964bfa2c0f08b9de80 Mon Sep 17 00:00:00 2001 Message-Id: <232dcc6d2e6c80af70eb72964bfa2c0f08b9de80.1312789493.git.stefano.lattar...@gmail.com> From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Mon, 8 Aug 2011 09:31:03 +0200 Subject: [PATCH] test harness: fixlet in workaround for VPATH rewrite issue Fixes a blunder in previous commit `v1.11-983-gfda3de5'. * lib/am/check.am (am__set_TESTS_bases): Add forgotten end-of-line anchor to sed expression. In comments, add reference to ... * tests/test-trs-basic.test: ... this test, which has been adapted and tightened (and tweaked). --- ChangeLog | 9 +++++++++ lib/Automake/tests/Makefile.in | 4 ++-- lib/am/check.am | 4 ++-- tests/Makefile.in | 4 ++-- tests/test-trs-basic.test | 4 ++-- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5330296..579e842 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2011-08-08 Stefano Lattarini <stefano.lattar...@gmail.com> + test harness: fixlet in workaround for VPATH rewrite issue + Fixes a minor in previous commit `v1.11-983-gfda3de5'. + * lib/am/check.am (am__set_TESTS_bases): Add forgotten end-of-line + anchor to sed expression. In comments, add reference to ... + * tests/test-trs-basic.test: ... this test, which has been adapted + and tightened (and tweaked). + +2011-08-08 Stefano Lattarini <stefano.lattar...@gmail.com> + test harness: work around a VPATH rewrite issue * lib/am/check.am (am__TEST_BASES): Removed, it's role taken over by ... diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 642e7b7..7825d10 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -161,10 +161,10 @@ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # `$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.test'. +# See also 'test-harness-vpath-rewrite.test' and 'test-trs-basic.test'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ - bases=`for f in $$bases; do echo $$f; done | sed 's/\.log//'`; \ + bases=`for f in $$bases; do echo $$f; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` # This can be used instead of $(MAKE) in recipes requiring a recursive call # to make, but which are not intended to be executed by "make -n". See the diff --git a/lib/am/check.am b/lib/am/check.am index 035b4c1..a6dcc30 100644 --- a/lib/am/check.am +++ b/lib/am/check.am @@ -110,10 +110,10 @@ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # `$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.test'. +# See also 'test-harness-vpath-rewrite.test' and 'test-trs-basic.test'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ - bases=`for f in $$bases; do echo $$f; done | sed 's/\.log//'`; \ + bases=`for f in $$bases; do echo $$f; done | sed 's/\.log$$//'`; \ ## Trim away any extra whitespace. This has already proved useful in ## avoiding weird bug on lesser make implementations. bases=`echo $$bases` diff --git a/tests/Makefile.in b/tests/Makefile.in index 1372a0f..7610af2 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -166,10 +166,10 @@ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # `$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.test'. +# See also 'test-harness-vpath-rewrite.test' and 'test-trs-basic.test'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ - bases=`for f in $$bases; do echo $$f; done | sed 's/\.log//'`; \ + bases=`for f in $$bases; do echo $$f; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` # This can be used instead of $(MAKE) in recipes requiring a recursive call # to make, but which are not intended to be executed by "make -n". See the diff --git a/tests/test-trs-basic.test b/tests/test-trs-basic.test index a9c34a5..8a8c3c8 100755 --- a/tests/test-trs-basic.test +++ b/tests/test-trs-basic.test @@ -72,8 +72,8 @@ for vpath in : false; do test x"`cat tb`" = x"foo bar sub/zardoz" rm -f tb # Please don't change the order of the stuff in TESTS, below. - TESTS='a foo.test foo2.sh foo3 foo.log foo-log foolog b.exe' $MAKE -e tb - test x"`cat tb`" = x"a foo foo2 foo3 foo.log foo-log foolog b.exe" + TESTS='foo.test foo2.sh foo-log foolog.test a.log.b.sh 0.exe' $MAKE -e tb + test x"`cat tb`" = x"foo foo2 foo-log foolog a.log.b 0.exe" rm -f tb cd $srcdir -- 1.7.2.3