[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/4] {branch "tests-init"} Tests defs: new variable $top_srcd
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH 2/4] {branch "tests-init"} Tests defs: new variable $top_srcdir. |
Date: |
Fri, 3 Sep 2010 00:24:12 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
* tests/defs.in ($top_srcdir): Define unconditionally
to @address@hidden Use it throughout.
* tests/ar-lib.test: Use `$top_srcdir' instead of
`$testsrcdir/..'.
* tests/auxdir.test: Likewise.
* tests/compile.test: Likewise.
* tests/compile2.test: Likewise.
* tests/compile3.test: Likewise.
* tests/compile5.test: Likewise.
* tests/mdate6.test: Likewise.
* tests/mkinst3.test: Likewise.
* tests/multlib.test: Likewise.
* tests/txinfo22.test: Likewise.
---
ChangeLog | 14 ++++++++++++++
tests/ar-lib.test | 3 ++-
tests/auxdir.test | 5 +++--
tests/compile.test | 4 ++--
tests/compile2.test | 4 ++--
tests/compile3.test | 2 +-
tests/compile5.test | 2 +-
tests/defs.in | 13 +++++++------
tests/mdate6.test | 2 +-
tests/mkinst3.test | 4 ++--
tests/multlib.test | 4 ++--
tests/obsolete.test | 2 +-
tests/txinfo22.test | 5 +++--
13 files changed, 41 insertions(+), 23 deletions(-)
From 5d0b098434d4e1fd35a6fa96b12448e876b50440 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Thu, 3 Jun 2010 01:03:00 +0200
Subject: [PATCH 2/4] Tests defs: new variable $top_srcdir.
* tests/defs.in ($top_srcdir): Define unconditionally
to @address@hidden Use it throughout.
* tests/ar-lib.test: Use `$top_srcdir' instead of
`$testsrcdir/..'.
* tests/auxdir.test: Likewise.
* tests/compile.test: Likewise.
* tests/compile2.test: Likewise.
* tests/compile3.test: Likewise.
* tests/compile5.test: Likewise.
* tests/mdate6.test: Likewise.
* tests/mkinst3.test: Likewise.
* tests/multlib.test: Likewise.
* tests/txinfo22.test: Likewise.
---
ChangeLog | 15 +++++++++++++++
tests/ar-lib.test | 3 ++-
tests/auxdir.test | 5 +++--
tests/compile.test | 4 ++--
tests/compile2.test | 4 ++--
tests/compile3.test | 2 +-
tests/compile5.test | 2 +-
tests/defs.in | 13 +++++++------
tests/mdate6.test | 2 +-
tests/mkinst3.test | 4 ++--
tests/multlib.test | 4 ++--
tests/obsolete.test | 2 +-
tests/txinfo22.test | 5 +++--
13 files changed, 42 insertions(+), 23 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5d881e0..07b9e2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2010-09-02 Stefano Lattarini <address@hidden>
+ Tests defs: new variable $top_srcdir.
+ * tests/defs.in ($top_srcdir): Define unconditionally
+ to @address@hidden Use it throughout.
+ * tests/ar-lib.test: Use `$top_srcdir' instead of
+ `$testsrcdir/..'.
+ * tests/auxdir.test: Likewise.
+ * tests/compile.test: Likewise.
+ * tests/compile2.test: Likewise.
+ * tests/compile3.test: Likewise.
+ * tests/compile5.test: Likewise.
+ * tests/mdate6.test: Likewise.
+ * tests/mkinst3.test: Likewise.
+ * tests/multlib.test: Likewise.
+ * tests/txinfo22.test: Likewise.
+
Tests defs: $srcdir is unconditionally substituted.
* tests/defs.in ($srcdir): Define unconditionally to @address@hidden
Remove code for $srcdir normalization, which is now useless.
diff --git a/tests/ar-lib.test b/tests/ar-lib.test
index d418c21..59fc9ab 100755
--- a/tests/ar-lib.test
+++ b/tests/ar-lib.test
@@ -20,7 +20,8 @@
set -e
-cp "$testsrcdir/../lib/ar-lib" .
+cp "$top_srcdir/lib/ar-lib" .
+
# Use a dummy lib, since lib isn't readily available on all systems
cat >lib <<'END'
#! /bin/sh
diff --git a/tests/auxdir.test b/tests/auxdir.test
index 95a7a20..3f0dd27 100755
--- a/tests/auxdir.test
+++ b/tests/auxdir.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2007 Free Software Foundation,
Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2007, 2010 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,7 +31,7 @@ cat > Makefile.am << 'END'
pkgdata_DATA =
END
-cp "$testsrcdir/../lib/mkinstalldirs" .
+cp "$top_srcdir/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 ef27afe..4d0856b 100755
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
set -e
-cp "$testsrcdir/../lib/compile" .
+cp "$top_srcdir/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 fe4574a..4cfc20e 100755
--- a/tests/compile2.test
+++ b/tests/compile2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
set -e
-cp "$testsrcdir/../lib/compile" .
+cp "$top_srcdir/lib/compile" .
cat >mycc <<'END'
source_seen=no
diff --git a/tests/compile3.test b/tests/compile3.test
index b77237b..34f6ca1 100755
--- a/tests/compile3.test
+++ b/tests/compile3.test
@@ -20,7 +20,7 @@
set -e
-cp "$testsrcdir/../lib/compile" .
+cp "$top_srcdir/lib/compile" .
# Use a dummy cl, since cl isn't readily available on all systems
cat >cl <<'END'
diff --git a/tests/compile5.test b/tests/compile5.test
index cd1468f..9574e60 100755
--- a/tests/compile5.test
+++ b/tests/compile5.test
@@ -21,7 +21,7 @@
set -e
-cp "$testsrcdir/../lib/compile" .
+cp "$top_srcdir/lib/compile" .
# Use a dummy cl, since cl isn't readily available on all systems
cat >cl <<'END'
diff --git a/tests/defs.in b/tests/defs.in
index 109c458..802655f 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -22,6 +22,7 @@
# Absolutely necessary variable(s).
srcdir='@abs_srcdir@'
+top_srcdir='@abs_top_srcdir@'
# Protect this file against multiple inclusion, useful for generated tests.
if test x"$am_skip_defs" = xyes; then
@@ -66,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=`pwd`/../lib/missing
+test -z "$MISSING" && MISSING=$top_srcdir/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"
@@ -278,7 +279,7 @@ signal=0
# Copy in some files we need.
for file in install-sh missing depcomp; do
- cp "$srcdir/../lib/$file" "$testSubDir/$file" || Exit 1
+ cp "$top_srcdir/lib/$file" "$testSubDir/$file" || Exit 1
done
cd ./$testSubDir
@@ -326,8 +327,8 @@ echo "=== Running test $0"
# We might need extra macros, e.g., from Libtool or Gettext.
# Find them on the system.
-# Use `-I $srcdir/../m4' in addition to `--acdir=$srcdir/../m4', because the
-# other `-I' directories added for libtool and gettext might contain
+# 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 `-Wno-syntax' because we do not want our test suite to fail because
# some third-party .m4 file is underquoted.
@@ -363,11 +364,11 @@ case " $required " in
case $srcdir,`pwd` in
*\ * | *\ *) Exit 77;;
esac
- ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I
$aclocaldir"
+ ACLOCAL="$ACLOCAL -Wno-syntax -I $top_srcdir/m4 $extra_includes -I
$aclocaldir"
;;
esac
-testaclocaldir='@abs_top_srcdir@/m4'
+testaclocaldir=$top_srcdir/m4
# POSIX no longer requires 'egrep' and 'fgrep',
# but some hosts lack 'grep -E' and 'grep -F'.
diff --git a/tests/mdate6.test b/tests/mdate6.test
index e7f7d69..172c710 100755
--- a/tests/mdate6.test
+++ b/tests/mdate6.test
@@ -24,7 +24,7 @@ a=
file='file name $a'
( : > "$file" ) || Exit 77
-cp "$testsrcdir"/../lib/mdate-sh .
+cp "$top_srcdir/lib/mdate-sh" .
$SHELL ./mdate-sh "$file" >stdout 2>stderr ||
{ cat stdout; cat stderr >&2; Exit 1; }
cat stdout
diff --git a/tests/mkinst3.test b/tests/mkinst3.test
index 18f18fb..cf1538a 100755
--- a/tests/mkinst3.test
+++ b/tests/mkinst3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ mkdir '~a b' || Exit 77
mkdir '~a b/-x y' || Exit 77
rm -rf '~a b'
-cp "$testsrcdir/../lib/mkinstalldirs" .
+cp "$top_srcdir/lib/mkinstalldirs" .
# Test mkinstalldirs with the installed mkdir.
diff --git a/tests/multlib.test b/tests/multlib.test
index 5ff19d7..c586367 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -107,8 +107,8 @@ mkdir libbar/sub
: > libbar/bar.c
-cp "$testsrcdir/../lib/config-ml.in" .
-cp "$testsrcdir/../lib/symlink-tree" .
+cp "$top_srcdir/lib/config-ml.in" .
+cp "$top_srcdir/lib/symlink-tree" .
$ACLOCAL
$AUTOCONF
diff --git a/tests/obsolete.test b/tests/obsolete.test
index 337e4db..80380fb 100755
--- a/tests/obsolete.test
+++ b/tests/obsolete.test
@@ -28,7 +28,7 @@ AC_INIT
END
$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
- "$testsrcdir/../m4/obsolete.m4" >> obs
+ "$top_srcdir/m4/obsolete.m4" >> obs
cat obs >> configure.in
$PERL -ne 'chomp; print "grep $_ stderr || Exit 1\n"; ' obs > obs.1
$PERL -ne 'chomp; print "grep $_ configure.in && Exit 1\n"; ' obs > obs.2
diff --git a/tests/txinfo22.test b/tests/txinfo22.test
index 3c2265d..b810fee 100755
--- a/tests/txinfo22.test
+++ b/tests/txinfo22.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2008, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -56,7 +57,7 @@ END
mkdir aux1
mkdir tex
-cp "$testsrcdir/../lib/texinfo.tex" tex
+cp "$top_srcdir/lib/texinfo.tex" tex
$ACLOCAL
$AUTOMAKE --add-missing
--
1.7.1
- [PATCH 0/4] {branch "tests-init"} Tests defs: renamings, tweakings and extensions in some global variables, Stefano Lattarini, 2010/09/02
- [PATCH 1/4] {branch "tests-init"} Tests defs: $srcdir is unconditionally substituted., Stefano Lattarini, 2010/09/02
- Re: [PATCH 1/4] {branch "tests-init"} Tests defs: $srcdir is unconditionally substituted., Ralf Wildenhues, 2010/09/05
- Re: [PATCH 1/4] {branch "tests-init"} Tests defs: $srcdir is unconditionally substituted., Stefano Lattarini, 2010/09/05
- 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 <=
[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, 2010/09/02
[PUSH] {branch "tests-init"} Tests defs: renamings, tweakings and extensions in some global variables, Stefano Lattarini, 2010/09/06