[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {master} tests: fix spurious failure with VPATH builds
From: |
Stefano Lattarini |
Subject: |
[FYI] {master} tests: fix spurious failure with VPATH builds |
Date: |
Fri, 17 Feb 2012 15:21:37 +0100 |
The 'is' helper script, used by some test cases since commit
'v1.11-1830-g96401cb' of 08-02-2012, "tests: better way to compare
lists in Makefile rules", is not available in VPATH builds, since
it resides in $(srcdir), nor in $(builddir), and only $(builddir)
is added to $PATH in the test script. This was causing spurious
failures.
Solve this issue by re-organizing a bit the layout and placing of
wrapper and help scripts used by the testsuite. This reorganization
is by no mean complete, but should be enough to solve the VPATH
issues.
* tests/is: Moved ...
* tests/ax/is: ... here
* tests/automake.in: Moved ...
* tests/wrap/automake.in: ... here.
* tests/aclocal.in: Moved ...
* tests/wrap/aclocal.in: ... here.
* tests/defs-static.in ($am_bindir, $PATH): Adjust.
* configure.ac (AC_CONFIG_FILES): Adjust
* tests/Makefile.am (EXTRA_DIST, check_SCRIPTS): Likewise.
* tests/get-sysconf.test: Likewise.
* .gitignore: Likewise.
---
.gitignore | 4 ++--
configure.ac | 9 +++++----
tests/Makefile.am | 4 ++--
tests/{ => ax}/is | 0
tests/defs-static.in | 6 +++++-
tests/get-sysconf.test | 4 ++--
tests/{ => wrap}/aclocal.in | 0
tests/{ => wrap}/automake.in | 0
8 files changed, 16 insertions(+), 11 deletions(-)
rename tests/{ => ax}/is (100%)
rename tests/{ => wrap}/aclocal.in (100%)
rename tests/{ => wrap}/automake.in (100%)
diff --git a/.gitignore b/.gitignore
index 59e80ab..6ee3708 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,8 +47,8 @@ Makefile
/doc/amhello/install-sh
/doc/amhello/missing
/lib/Automake/Config.pm
-/tests/aclocal-1.*
-/tests/automake-1.*
+/tests/wrap/aclocal-1.*
+/tests/wrap/automake-1.*
/tests/defs-static
/tests/testsuite-part.am
/tests/*-w.tap
diff --git a/configure.ac b/configure.ac
index 775c36d..856b80a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -342,11 +342,12 @@ AC_CONFIG_FILES([
])
AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
AC_CONFIG_LINKS([tests/defs:tests/defs])
-AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
- [chmod +x tests/aclocal-${APIVERSION}],
+AC_CONFIG_FILES([tests/wrap/aclocal-${APIVERSION}:tests/wrap/aclocal.in],
+ [chmod +x tests/wrap/aclocal-${APIVERSION}],
+ [APIVERSION=$APIVERSION])
+AC_CONFIG_FILES([tests/wrap/automake-${APIVERSION}:tests/wrap/automake.in],
+ [chmod +x tests/wrap/automake-${APIVERSION}],
[APIVERSION=$APIVERSION])
-AC_CONFIG_FILES([tests/automake-${APIVERSION}:tests/automake.in],
- [chmod +x tests/automake-${APIVERSION}])
AC_OUTPUT
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 451a8f9..bb7bece 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,7 +28,7 @@ TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL)
$(top_srcdir)/lib/tap-driver.sh
AM_TAP_LOG_DRIVER_FLAGS = --merge
-EXTRA_DIST = is ChangeLog-old
+EXTRA_DIST = ax/is ChangeLog-old
TESTS = ## Will be updated later.
@@ -107,7 +107,7 @@ $(generated_TESTS) $(srcdir)/testsuite-part.am: \
gen-testsuite-part list-of-tests.mk Makefile.am $(handwritten_TESTS)
# Static dependencies valid for each test case.
-check_SCRIPTS = aclocal-$(APIVERSION) automake-$(APIVERSION)
+check_SCRIPTS = wrap/aclocal-$(APIVERSION) wrap/automake-$(APIVERSION)
check_DATA = defs defs-static plain-functions.sh tap-functions.sh
EXTRA_DIST += tap-functions.sh plain-functions.sh
diff --git a/tests/is b/tests/ax/is
similarity index 100%
rename from tests/is
rename to tests/ax/is
diff --git a/tests/defs-static.in b/tests/defs-static.in
index b2e884b..6a815c0 100644
--- a/tests/defs-static.in
+++ b/tests/defs-static.in
@@ -115,7 +115,7 @@ case ${am_running_installcheck:=no} in
no)
am_amdir=$top_testsrcdir/lib/am
am_automake_acdir=$top_testsrcdir/m4
- am_bindir=$testbuilddir
+ am_bindir=$testbuilddir/wrap
am_datadir=$top_testsrcdir
am_docdir=$top_testsrcdir/doc
am_pkgvdatadir=$top_testsrcdir/lib
@@ -238,4 +238,8 @@ case $PATH in
$am_bindir$PATH_SEPARATOR*) ;;
*) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
esac
+
+# Make our helper script accessible by default.
+PATH=$testsrcdir/ax$PATH_SEPARATOR$PATH
+
export PATH
diff --git a/tests/get-sysconf.test b/tests/get-sysconf.test
index 27d2b16..f37e1d2 100755
--- a/tests/get-sysconf.test
+++ b/tests/get-sysconf.test
@@ -42,8 +42,8 @@ $PERL -V || st=1
$PERL -e 'use TAP::Parser; print $TAP::Parser::VERSION, "\n"' || :
cat "$top_testbuilddir/config.log" || st=1
-cat "$testbuilddir/aclocal-$APIVERSION" || st=1
-cat "$testbuilddir/automake-$APIVERSION" || st=1
+cat "$testbuilddir/wrap/aclocal-$APIVERSION" || st=1
+cat "$testbuilddir/wrap/automake-$APIVERSION" || st=1
if test $st -eq 0; then
# This test SKIPs, so that all the information it has gathered and
diff --git a/tests/aclocal.in b/tests/wrap/aclocal.in
similarity index 100%
rename from tests/aclocal.in
rename to tests/wrap/aclocal.in
diff --git a/tests/automake.in b/tests/wrap/automake.in
similarity index 100%
rename from tests/automake.in
rename to tests/wrap/automake.in
--
1.7.9
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] {master} tests: fix spurious failure with VPATH builds,
Stefano Lattarini <=