]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: avoid creating useless files in some test directories
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 10 Sep 2011 19:34:19 +0000 (21:34 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 10 Sep 2011 21:19:35 +0000 (23:19 +0200)
* tests/aclocal.test: Define `$am_create_testdir' to "empty"
before sourcing ./defs, to avoid bringing in unused auxiliary
files.  Related adjustments.
* tests/aclocal3.test: Likewise.
* tests/aclocal8.test: Likewise.
* tests/aclocal9.test: Likewise.
* tests/acloca10.test: Likewise.
* tests/acloca11.test: Likewise.
* tests/acloca12.test: Likewise.
* tests/acloca15.test: Likewise.
* tests/acloca16.test: Likewise.
* tests/acloca17.test: Likewise.
* tests/acloca18.test: Likewise.
* tests/acloca20.test: Likewise.
* tests/acloca21.test: Likewise.
* tests/acloca23.test: Likewise.
* tests/aclocal-print-acdir.test: Likewise.
* tests/ar-lib.test: Likewise.
* tests/compile.test: Likewise.
* tests/compile2.test: Likewise.
* tests/compile3.test: Likewise.
* tests/compile6.test: Likewise.
* tests/instsh2.test: Likewise.
* tests/instsh3.test: Likewise.
* tests/mdate5.test: Likewise.
* tests/mdate6.test: Likewise.
* tests/missing3.test: Likewise.
* tests/missing5.test: Likewise.
* tests/mkinst3.test: Likewise.
* tests/self-check-explicit-skips.test: Likewise.
* tests/self-check-report.test: Likewise.
* tests/self-check-sanity.test: Likewise.
* tests/tap-driver-stderr.test: Likewise.

32 files changed:
ChangeLog
tests/acloca10.test
tests/acloca11.test
tests/acloca12.test
tests/acloca15.test
tests/acloca16.test
tests/acloca17.test
tests/acloca18.test
tests/acloca20.test
tests/acloca21.test
tests/acloca23.test
tests/aclocal-print-acdir.test
tests/aclocal.test
tests/aclocal3.test
tests/aclocal8.test
tests/aclocal9.test
tests/ar-lib.test
tests/compile.test
tests/compile2.test
tests/compile3.test
tests/compile6.test
tests/instsh2.test
tests/instsh3.test
tests/mdate5.test
tests/mdate6.test
tests/missing3.test
tests/missing5.test
tests/mkinst3.test
tests/self-check-explicit-skips.test
tests/self-check-report.test
tests/self-check-sanity.test
tests/tap-driver-stderr.test

index 39aa991debc6148e313fffa84d9c9d75c7463a97..c61f044df1164dca539ee26bf8849cef35493ec4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2011-09-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid creating useless files in some test directories
+       * tests/aclocal.test: Define `$am_create_testdir' to "empty"
+       before sourcing ./defs, to avoid bringing in unused auxiliary
+       files.  Related adjustments.
+       * tests/aclocal3.test: Likewise.
+       * tests/aclocal8.test: Likewise.
+       * tests/aclocal9.test: Likewise.
+       * tests/acloca10.test: Likewise.
+       * tests/acloca11.test: Likewise.
+       * tests/acloca12.test: Likewise.
+       * tests/acloca15.test: Likewise.
+       * tests/acloca16.test: Likewise.
+       * tests/acloca17.test: Likewise.
+       * tests/acloca18.test: Likewise.
+       * tests/acloca20.test: Likewise.
+       * tests/acloca21.test: Likewise.
+       * tests/acloca23.test: Likewise.
+       * tests/aclocal-print-acdir.test: Likewise.
+       * tests/ar-lib.test: Likewise.
+       * tests/compile.test: Likewise.
+       * tests/compile2.test: Likewise.
+       * tests/compile3.test: Likewise.
+       * tests/compile6.test: Likewise.
+       * tests/instsh2.test: Likewise.
+       * tests/instsh3.test: Likewise.
+       * tests/mdate5.test: Likewise.
+       * tests/mdate6.test: Likewise.
+       * tests/missing3.test: Likewise.
+       * tests/missing5.test: Likewise.
+       * tests/mkinst3.test: Likewise.
+       * tests/self-check-explicit-skips.test: Likewise.
+       * tests/self-check-report.test: Likewise.
+       * tests/self-check-sanity.test: Likewise.
+       * tests/tap-driver-stderr.test: Likewise.
+
 2011-09-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        test defs: more environment cleanup
index daf81a1786094592513b77e41bb9144afecc365b..0041d57645ae3509b70227180fcbbb467d674629 100755 (executable)
 # TODO: write a sister test that doesn't use a `dirlist' file, but
 # TODO: puts third-party macros directly into `acdir'.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+cat > configure.in << 'END'
+AC_INIT
 MACRO2
 MACRO1
 MACRO3
index 25e7a50151b04fa72b08199d62cb096548f310da..ddb91567d1aba0d6fc34f88820759a1599d8d4c4 100755 (executable)
 # Make sure that when two files define the same macro in the same
 # directory, the macro from the lexically greatest file is used.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+cat > configure.in << 'END'
+AC_INIT
 MACRO2
 MACRO1
 END
index 2fb57e9ddb095dd12cc12f302f45ae21e680bdc1..d4d146463eebc0ae15c101dc8f6124883c7ba2eb 100755 (executable)
 # directory, the macro from the lexically greatest file is used.
 # Same as acloca11.test, but without calling MACRO2.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
 MACRO1
 END
 
index 9cb70d184367e252f788fadc8b023b267d669d54..b1f37230f867166d8323595bbf3b1159c0c70fdc 100755 (executable)
 # Make sure aclocal scans configure.in for macro definitions.
 # PR/319.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 # Start macros with AM_ because that causes aclocal to complain if it
 # cannot find them.
 
-cat >> configure.in << 'END'
+cat > configure.in << 'END'
 m4_include([somedef.m4])
 AC_DEFUN([AM_SOME_MACRO])
 AC_DEFUN([AM_SOME_OTHER_MACRO])
index 5f6dc60bd8828e2ae120a4fbdb51d2af9b85cba4..330085635bc7660e2df200b6e885f9949d462ca2 100755 (executable)
 # Make sure aclocal does not include definitions that are not actually
 # evaluated.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+cat > configure.in << 'END'
 AC_SUBST([POM])
 END
 
index c1355c54bc40e37ff6d94e18760019253d4576b8..282dc7ef92c251f81cc20820c39f2866c1cbd634 100755 (executable)
 
 # Make sure aclocal report unused required macros.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+cat > configure.in << 'END'
+AC_INIT
 SOME_DEFS
 END
 
@@ -34,4 +36,6 @@ EOF
 
 WARNINGS=error $ACLOCAL -I m4 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep 'configure.in:4:.*UNDEFINED_MACRO' stderr
+grep '^configure\.in:2:.*UNDEFINED_MACRO' stderr
+
+:
index cb5c408f9c7b4c25b0d38f6ded6ad4d67aadd0e2..f68303d92f9843e760606348254cad5e2aa88b3a 100755 (executable)
 
 # Test for --install with #serial numbers.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+cat > configure.in << 'END'
+AC_INIT
 AM_MACRO1
 AM_MACRO2
 END
index 9f692f8e29e3a59fc1af420e7a73918c6cc96482..064fcdef5a242c24b659a2382d98af8300185d87 100755 (executable)
@@ -16,6 +16,7 @@
 
 # Make sure aclocal does not write into symlinked aclocal.m4.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 cat >foo.m4 <<'END'
index 541892f4237bb5eb9ec7d107491ad416b3a85a9b..716cd801e6cb8c04351afafdc20eaa26fe51f16a 100755 (executable)
@@ -19,6 +19,7 @@
 # Also make sure aclocal does not think 'include' is
 # an Autoconf macro.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 cat >>configure.in <<EOF
index 5a05ed20c9147c65277acb87368832c1cb43229a..f4f8a22b538e20bae8f083a09ef0ed77bb306c49 100755 (executable)
 
 # Ensure we diagnose underquoted AC_DEFUN's.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+cat > configure.in << 'END'
+AC_INIT
 FOO
 END
 
index 297c702d37afc05f5ffffb88690d758aed8edad7..c55ae2b170c87e79458b568680389ebb279ca2c3 100755 (executable)
@@ -16,6 +16,7 @@
 
 # Test on aclocal's `--print-ac-dir' option.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 set -e
index 47c7dfa9f5cc980210b912101434f3e3ed39b16b..b85250f952f57ad866132959aa14dd2ab4fa8399 100755 (executable)
 
 # Test on some aclocal options.  Report from Alexandre Oliva.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
+echo "AC_INIT([$me], [0]) AM_INIT_AUTOMAKE" > configure.in
+
 $ACLOCAL --output=fred
 test -f fred
 
index f5b2474e7eea85110f7490d6e97b91d4d7e78e96..f679239151c25ab840b34da45e503d6b74abe161 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure include of include detects missing macros
+
+am_create_testdir=empty
 . ./defs || Exit 1
 
-echo GNOME_X_CHECKS >> configure.in
+cat >> configure.in <<END
+AC_INIT([$me], [1.0])
+GNOME_X_CHECKS
+END
 
 mkdir macros
 
index 2a1a51a825cb18c7636fb604f60778cb103804a1..86d0e026bba1b1bfb13fc705af583939e8befb7e 100755 (executable)
 
 # Make sure aclocal does not require unused macros.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+cat > configure.in << 'END'
 SOME_DEFS
 END
 
index b182a1af6b34a89341ba3a39ae2825b18d772cf1..314934182af9d5e7d4afa8442bcfc59ca07559ab 100755 (executable)
 
 # Make sure aclocal define macros in the same order as -I's.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
+cat > configure.in << 'END'
+AC_INIT
 MACRO1
 MACRO2
 END
index 6f9c93c4ed73bd867246a1a3b764374a7c5ac26a..116640fe4550b0f4fab3ee6daf45d24ca49d5b64 100755 (executable)
@@ -16,6 +16,7 @@
 
 # Make sure `ar-lib' wraps the Microsoft Library Manager (lib) correctly.
 
+am_create_testdir=empty
 required=xsi-lib-shell
 . ./defs || Exit 1
 
index 0ba9ddf8101f1dad209e3d8a0d00773dec65a640..12fb2be5896a32f322dbfb39f0e945b9b9adea12 100755 (executable)
@@ -16,6 +16,7 @@
 
 # Make sure `compile' preserves spaces in its arguments.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 get_shell_script compile
index 180fcc36e428117a4eb6d5e60d3ee23f4ab13234..c89be9fca918fa60f89e74f8cf66e1dad420a9b7 100755 (executable)
@@ -16,6 +16,7 @@
 
 # Make sure `compile' deals correctly with w32 style paths.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 get_shell_script compile
index b703f66de2bad9b793a5f1d98dd29a86d9d3866c..800db1db1f16c7630a5f7e460e98457a6a7a789a 100755 (executable)
@@ -16,6 +16,7 @@
 
 # Make sure `compile' wraps the Microsoft C/C++ compiler (cl) correctly
 
+am_create_testdir=empty
 required=xsi-lib-shell
 . ./defs || Exit 1
 
index fff14876dde629de19e8b15bd5d8463eb47c4d80..5a2ac912b602000c28d60d1175b3ce668920aa2d 100755 (executable)
@@ -16,6 +16,7 @@
 
 # Make sure `compile' searches libraries correctly
 
+am_create_testdir=empty
 required=xsi-lib-shell
 . ./defs || Exit 1
 
index 8cc5f2617d13f657889aee7b3694adacfe80f645..45e17465b44e7e8f85c6aacf11fb217b4576adc2 100755 (executable)
@@ -17,6 +17,7 @@
 
 # Various install-sh checks.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 get_shell_script install-sh
index 2cdf4a9e79aa6ec5ca3ba42e367761d898d2c376..80c2e549f567aa1e62437f71239b9431d613b360 100755 (executable)
@@ -16,6 +16,7 @@
 
 # More install-sh checks: check -C.
 
+am_create_testdir=empty
 required=non-root
 . ./defs || Exit 1
 
index f7c7cfed7c760bf30e2ddf769462b6d66bd4a748..db6a6c6097fac5de7b236b0684e8e0e2b08b8d54 100755 (executable)
 
 # Test to make sure mdate-sh works correctly.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 get_shell_script mdate-sh
 
-set x `./mdate-sh install-sh`
+set x `./mdate-sh mdate-sh`
 shift
 echo "$*" # For debugging.
 
index 70360e721285bcf8bb835e609abdd298bd07c909..de93f35d965173444daed2af92886af3a5936d66 100755 (executable)
@@ -16,6 +16,7 @@
 
 # mdate-sh can work with weird file names, doesn't eval too much.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 a=
index 328212c4a850d6221d10a261f35b509d2a24c8b4..20b2429b6d3c9d4dd19e8ddd6915ba374a0bd5d5 100755 (executable)
@@ -16,6 +16,7 @@
 
 # Test missing when running a tool's --version.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 get_shell_script missing
index 1cd4918062e053dc04c52f57a3b5706918611aa1..0cb71e80d897016beccd8cab78c5f6d9dd5507b9 100755 (executable)
@@ -17,6 +17,7 @@
 # Test how well `missing' finds output file names of various tools.
 # PR automake/483.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 get_shell_script missing
index 3572ab2788a28623dfdd8cc4d1bfbfaa7e8fe8af..9dba96868e0fe6423358ba97a829536f4100403a 100755 (executable)
@@ -16,6 +16,7 @@
 
 # Test mkinstalldirs with spaces in directory names.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 # Make sure the directory we will create can be created...
index d24e0ef1a08d6fa7e3c535ea34eb1001064f10e8..530048df74dee662b4d92ad6813c48d815a3a624 100755 (executable)
@@ -17,6 +17,7 @@
 # Sanity check for the automake testsuite.
 # Check creation/removal of temporary test working directory by `./defs'.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 test x"$sh_errexit_works" = x"yes" || skip_ "no working shell exit trap"
index 5434d5aadd036ba13cc9f691e019052cbffb0829..ae90e9f03844bbb588ed77ccb302209eafb1cc81 100755 (executable)
@@ -20,6 +20,7 @@
 
 unset stderr_fileno_ || :
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 set +e
index 3e60a68838fd9b4231ebf4f1b7f90d164f42c1e9..8626914f2fab9f3ddfaa0aa5f60c50df0890cfe8 100755 (executable)
@@ -19,6 +19,7 @@
 # that we can use `defs' elsewhere, when we duplicate some of the
 # infrastructure from the automake/tests subdirectory.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
 # Avoid to confuse traces from child processed with our own traces.
index 396624e30ca88b1c2635d2bf4097ee7863aeddbe..114734176dff7797abbc3a696ca075367e80e6b6 100755 (executable)
@@ -19,6 +19,7 @@
 
 required=non-root
 parallel_tests=yes
+am_create_testdir=empty
 . ./defs || Exit 1
 
 fetch_tap_driver