test defs: define default $distdir (help reducing duplication)
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 12 Apr 2011 14:50:33 +0000 (16:50 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 12 Apr 2011 14:50:33 +0000 (16:50 +0200)
* tests/defs.in ($distdir): New variable, might be used in
testcases checking distribution-related features.
* tests/pr9.test: Use it.
* tests/subdir9.test: Likewise.
* tests/vtexi3.test: Add comment explaining why we redefine
$distdir in this test.

ChangeLog
tests/defs.in
tests/pr9.test
tests/subdir9.test
tests/vtexi3.test

index 20862ea..8a144af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-04-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test defs: define default $distdir (help reducing duplication)
+       * tests/defs.in ($distdir): New variable, might be used in
+       testcases checking distribution-related features.
+       * tests/pr9.test: Use it.
+       * tests/subdir9.test: Likewise.
+       * tests/vtexi3.test: Add comment explaining why we redefine
+       $distdir in this test.
+
 2011-04-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        depcomp: fix bugs in tests and in the depcomp script
index 8aaf108..cf07a4e 100644 (file)
@@ -66,6 +66,10 @@ test -f "$srcdir/defs.in" || {
 
 me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
 
+# This might be used in testcases checking distribution-related features.
+# Test scripts are free to override this if they need to.
+distdir=$me-1.0
+
 APIVERSION='@APIVERSION@'
 PATH_SEPARATOR='@PATH_SEPARATOR@'
 
index a2e71d7..1f27f69 100755 (executable)
@@ -47,8 +47,6 @@ $AUTOMAKE -a -c
 $MAKE
 $MAKE distcheck
 
-distdir=$me-1.0
-
 gzip -d $distdir.tar.gz
 
 tar tf $distdir.tar | $FGREP support
index c73ca18..403a376 100755 (executable)
@@ -43,8 +43,6 @@ cat >src/subdir2/Makefile.am <<'EOF'
 EXTRA_DIST = foo
 EOF
 
-distdir=$me-1.0
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
index 34f46c5..4b0f45d 100755 (executable)
@@ -24,6 +24,8 @@
 
 set -e
 
+# We are going to override package version in AC_INIT, so we need
+# to redefine the name of the distdir as well.
 distdir=$me-7.45.3a
 
 # This should work without tex, texinfo or makeinfo