[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/4] {branch "tests-init"} Tests defs: $srcdir and $top_srcdir re
From: |
Stefano Lattarini |
Subject: |
[PATCH 4/4] {branch "tests-init"} Tests defs: $srcdir and $top_srcdir renaming. |
Date: |
Fri, 3 Sep 2010 00:28:13 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
* tests/defs.in ($srcdir): Remove, define $testsrcdir directly.
($top_srcdir): Renamed to ...
($top_testsrcdir): ... to this, for consistency.
* tests/aclocal.test: All uses changed.
* tests/auxdir.test: Likewise.
* tests/compile.test: Likewise.
* tests/compile2.test: Likewise.
* tests/mkinst3.test: Likewise.
* tests/multlib.test: Likewise.
* tests/txinfo22.test: Likewise.
* tests/Makefile.am ($(parallel_tests)): Generation of derived
tests updated.
---
ChangeLog | 14 ++++++++++++++
tests/Makefile.am | 6 +++---
tests/Makefile.in | 6 +++---
tests/aclocal.test | 2 +-
tests/auxdir.test | 2 +-
tests/compile.test | 2 +-
tests/compile2.test | 2 +-
tests/defs.in | 32 +++++++++++++++-----------------
tests/mkinst3.test | 2 +-
tests/multlib.test | 4 ++--
tests/txinfo22.test | 2 +-
11 files changed, 43 insertions(+), 31 deletions(-)
From 38c42b5f9e7bfc8cc202f902be852feb85fbc130 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 2 Jun 2010 21:55:23 +0200
Subject: [PATCH 4/4] Tests defs: $srcdir and $top_srcdir renaming.
* tests/defs.in ($srcdir): Remove, define $testsrcdir directly.
($top_srcdir): Renamed to ...
($top_testsrcdir): ... to this, for consistency.
* tests/aclocal.test: All uses changed.
* tests/auxdir.test: Likewise.
* tests/compile.test: Likewise.
* tests/compile2.test: Likewise.
* tests/mkinst3.test: Likewise.
* tests/multlib.test: Likewise.
* tests/txinfo22.test: Likewise.
* tests/Makefile.am ($(parallel_tests)): Generation of derived
tests updated.
---
ChangeLog | 14 ++++++++++++++
tests/Makefile.am | 6 +++---
tests/Makefile.in | 6 +++---
tests/aclocal.test | 2 +-
tests/auxdir.test | 2 +-
tests/compile.test | 2 +-
tests/compile2.test | 2 +-
tests/defs.in | 32 +++++++++++++++-----------------
tests/mkinst3.test | 2 +-
tests/multlib.test | 4 ++--
tests/txinfo22.test | 2 +-
11 files changed, 43 insertions(+), 31 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1f8c954..bd6d02b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
2010-09-02 Stefano Lattarini <address@hidden>
+ Tests defs: $srcdir and $top_srcdir renaming.
+ * tests/defs.in ($srcdir): Remove, define $testsrcdir directly.
+ ($top_srcdir): Renamed to ...
+ ($top_testsrcdir): ... to this, for consistency.
+ * tests/aclocal.test: All uses changed.
+ * tests/auxdir.test: Likewise.
+ * tests/compile.test: Likewise.
+ * tests/compile2.test: Likewise.
+ * tests/mkinst3.test: Likewise.
+ * tests/multlib.test: Likewise.
+ * tests/txinfo22.test: Likewise.
+ * tests/Makefile.am ($(parallel_tests)): Generation of derived
+ tests updated.
+
Tests defs: remove variable $testaclocaldir.
* tests/defs.in ($testaclocaldir): Removed.
* tests/aclocal.test: Use `$top_srcdir/m4', not `$testaclocaldir'.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d86b03b..f4fba45 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -34,10 +34,10 @@ $(parallel_tests): Makefile.am
{ echo '#!/bin/sh'; \
echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
echo; \
- echo '# Ensure proper definition of $$srcdir.'; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
echo 'am_skip_defs=yes'; \
echo '. ./defs || exit 99'; \
- echo 'test -n "$$srcdir" || exit 99 # sanity check'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
echo; \
echo "# Run the test with Automake's parallel-tests driver enabled.";
\
echo 'parallel_tests=yes'; \
@@ -46,7 +46,7 @@ $(parallel_tests): Makefile.am
echo "if test -f \"./$$input\"; then"; \
echo " . \"./$$input\""; \
echo 'else'; \
- echo " . \"\$$srcdir/$$input\""; \
+ echo " . \"\$$testsrcdir/$$input\""; \
echo 'fi'; \
} > address@hidden
$(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 77ec888..af80fdb 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1408,10 +1408,10 @@ $(parallel_tests): Makefile.am
{ echo '#!/bin/sh'; \
echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
echo; \
- echo '# Ensure proper definition of $$srcdir.'; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
echo 'am_skip_defs=yes'; \
echo '. ./defs || exit 99'; \
- echo 'test -n "$$srcdir" || exit 99 # sanity check'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
echo; \
echo "# Run the test with Automake's parallel-tests driver enabled.";
\
echo 'parallel_tests=yes'; \
@@ -1420,7 +1420,7 @@ $(parallel_tests): Makefile.am
echo "if test -f \"./$$input\"; then"; \
echo " . \"./$$input\""; \
echo 'else'; \
- echo " . \"\$$srcdir/$$input\""; \
+ echo " . \"\$$testsrcdir/$$input\""; \
echo 'fi'; \
} > address@hidden
$(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
diff --git a/tests/aclocal.test b/tests/aclocal.test
index 7c9eb28..3e78df9 100755
--- a/tests/aclocal.test
+++ b/tests/aclocal.test
@@ -41,6 +41,6 @@ grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --versi
-test x"`$ACLOCAL --print-ac-dir`" = x"$top_srcdir/m4"
+test x"`$ACLOCAL --print-ac-dir`" = x"$top_testsrcdir/m4"
:
diff --git a/tests/auxdir.test b/tests/auxdir.test
index 3f0dd27..74f6e6c 100755
--- a/tests/auxdir.test
+++ b/tests/auxdir.test
@@ -31,7 +31,7 @@ cat > Makefile.am << 'END'
pkgdata_DATA =
END
-cp "$top_srcdir/lib/mkinstalldirs" .
+cp "$top_testsrcdir/lib/mkinstalldirs" .
# The "././" prefix confuses Automake into thinking it is doing a
# subdir build. Yes, this is hacky.
diff --git a/tests/compile.test b/tests/compile.test
index 4d0856b..6162861 100755
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -20,7 +20,7 @@
set -e
-cp "$top_srcdir/lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
# -o 'a c' should not be stripped because 'a c' is not an object
# (it does not matter whether touch creates ./-- or not)
diff --git a/tests/compile2.test b/tests/compile2.test
index 4cfc20e..e3069d0 100755
--- a/tests/compile2.test
+++ b/tests/compile2.test
@@ -20,7 +20,7 @@
set -e
-cp "$top_srcdir/lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
cat >mycc <<'END'
source_seen=no
diff --git a/tests/defs.in b/tests/defs.in
index 45504ab..f73edd4 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -21,8 +21,8 @@
# Tom Tromey <address@hidden>
# Absolutely necessary variable(s).
-srcdir='@abs_srcdir@'
-top_srcdir='@abs_top_srcdir@'
+testsrcdir='@abs_srcdir@'
+top_testsrcdir='@abs_top_srcdir@'
# Protect this file against multiple inclusion, useful for generated tests.
if test x"$am_skip_defs" = xyes; then
@@ -50,9 +50,9 @@ test -f ./defs || {
exit 1
}
-# Ensure $srcdir is set correctly.
-test -f "$srcdir/defs.in" || {
- echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
+# Ensure $testsrcdir is set correctly.
+test -f "$testsrcdir/defs.in" || {
+ echo "$testsrcdir/defs.in not found, check \$testsrcdir" 1>&2
exit 1
}
@@ -67,7 +67,7 @@ test -z "$MAKE" && MAKE=make
test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
-test -z "$MISSING" && MISSING=$top_srcdir/lib/missing
+test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
# Use -Werror because this also turns some Perl warnings into error.
# (Tests for which this is inappropriate should use -Wno-error.)
test -z "$ACLOCAL" && ACLOCAL="address@hidden@ -Werror"
@@ -279,7 +279,7 @@ signal=0
# Copy in some files we need.
for file in install-sh missing depcomp; do
- cp "$top_srcdir/lib/$file" "$testSubDir/$file" || Exit 1
+ cp "$top_testsrcdir/lib/$file" "$testSubDir/$file" || Exit 1
done
cd ./$testSubDir
@@ -312,6 +312,9 @@ unset DESTDIR
unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
unset htmldir includedir infodir libdir libexecdir localedir mandir
unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
+# The tests call `make -e' but we do not want $srcdir from the environment
+# to override the definition from the Makefile.
+unset srcdir
# Also unset variables that control our test driver. While not
# conceptually independent, they cause some changed semantics we
# need to control (and test for) in some of the tests to ensure
@@ -327,9 +330,9 @@ echo "=== Running test $0"
# We might need extra macros, e.g., from Libtool or Gettext.
# Find them on the system.
-# Use `-I $top_srcdir/m4' in addition to `--acdir=$top_srcdir/m4', because
-# the other `-I' directories added for libtool and gettext might contain
-# files from an old version of Automake that we don't want to use.
+# Use `-I $top_testsrcdir/m4' in addition to `--acdir=$top_testsrcdir/m4',
+# because the other `-I' directories added for libtool and gettext might
+# contain files from an old version of Automake that we don't want to use.
# Use `-Wno-syntax' because we do not want our test suite to fail because
# some third-party .m4 file is underquoted.
case " $required " in
@@ -361,10 +364,10 @@ case " $required " in
# Libtool cannot cope with spaces in the build tree. Our testsuite setup
# cannot cope with spaces in the source tree name for Libtool and gettext
# tests.
- case $srcdir,`pwd` in
+ case $testsrcdir,`pwd` in
*\ * | *\ *) Exit 77;;
esac
- ACLOCAL="$ACLOCAL -Wno-syntax -I $top_srcdir/m4 $extra_includes -I
$aclocaldir"
+ ACLOCAL="$ACLOCAL -Wno-syntax -I $top_testsrcdir/m4 $extra_includes -I
$aclocaldir"
;;
esac
@@ -378,11 +381,6 @@ FGREP='@FGREP@'
# and can be up to 3 seconds in the future w.r.t. the system clock.
sleep='sleep @MODIFICATION_DELAY@'
-# The tests call `make -e' but we do not want $srcdir from the environment
-# to override the definition from the Makefile.
-testsrcdir=$srcdir
-unset srcdir
-
# An old timestamp that can be given to a file, in "touch -t" format.
# The time stamp should be portable to all file systems of interest.
# Just for fun, choose the exact time of the announcement of the GNU project
diff --git a/tests/mkinst3.test b/tests/mkinst3.test
index cf1538a..6ccabf9 100755
--- a/tests/mkinst3.test
+++ b/tests/mkinst3.test
@@ -25,7 +25,7 @@ mkdir '~a b' || Exit 77
mkdir '~a b/-x y' || Exit 77
rm -rf '~a b'
-cp "$top_srcdir/lib/mkinstalldirs" .
+cp "$top_testsrcdir/lib/mkinstalldirs" .
# Test mkinstalldirs with the installed mkdir.
diff --git a/tests/multlib.test b/tests/multlib.test
index c586367..73e9b37 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -107,8 +107,8 @@ mkdir libbar/sub
: > libbar/bar.c
-cp "$top_srcdir/lib/config-ml.in" .
-cp "$top_srcdir/lib/symlink-tree" .
+cp "$top_testsrcdir/lib/config-ml.in" .
+cp "$top_testsrcdir/lib/symlink-tree" .
$ACLOCAL
$AUTOCONF
diff --git a/tests/txinfo22.test b/tests/txinfo22.test
index b810fee..4adf473 100755
--- a/tests/txinfo22.test
+++ b/tests/txinfo22.test
@@ -57,7 +57,7 @@ END
mkdir aux1
mkdir tex
-cp "$top_srcdir/lib/texinfo.tex" tex
+cp "$top_testsrcdir/lib/texinfo.tex" tex
$ACLOCAL
$AUTOMAKE --add-missing
--
1.7.1
- Re: [PATCH 1/4] {branch "tests-init"} Tests defs: $srcdir is unconditionally substituted., (continued)
- Re: [PATCH 1/4] {branch "tests-init"} Tests defs: $srcdir is unconditionally substituted., Ralf Wildenhues, 2010/09/06
- Re: [PATCH 1/4] {branch "tests-init"} Tests defs: $srcdir is unconditionally substituted., Stefano Lattarini, 2010/09/06
- Re: [PATCH 1/4] {branch "tests-init"} Tests defs: $srcdir is unconditionally substituted., Ralf Wildenhues, 2010/09/06
- Re: [PATCH 1/4] {branch "tests-init"} Tests defs: $srcdir is unconditionally substituted., Stefano Lattarini, 2010/09/06
- Re: [PATCH 1/4] {branch "tests-init"} Tests defs: $srcdir is unconditionally substituted., Ralf Wildenhues, 2010/09/06
Re: [PATCH 2/4] {branch "tests-init"} Tests defs: new variable $top_srcdir., Stefano Lattarini, 2010/09/02
[PATCH 3/4] {branch "tests-init"} Tests defs: remove variable $testaclocaldir., Stefano Lattarini, 2010/09/02
[PATCH 4/4] {branch "tests-init"} Tests defs: $srcdir and $top_srcdir renaming.,
Stefano Lattarini <=
[PUSH] {branch "tests-init"} Tests defs: renamings, tweakings and extensions in some global variables, Stefano Lattarini, 2010/09/06