]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: extend tests on `--add-missing' and `--copy' a bit
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 13 Jun 2011 17:42:52 +0000 (19:42 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 13 Jun 2011 17:42:52 +0000 (19:42 +0200)
* tests/add-missing.test: Fix typo in heading comments.  Try with
another testcase that install many (but not all) the auxiliary
scripts at once, and uses non-standard (but valid and documented)
setups (e.g., defining YACC in Makefile.am instead of calling
AC_PROG_YACC from configure.in).
* tests/copy.test: Reference `add-missing.test' in heading
comments.  Try few more test scenarios.

ChangeLog
tests/add-missing.test
tests/copy.test

index a41dfdf7850a126554188a69bb09167832c15ca5..7139ccbdb38952e6978cfc6d8df606581f4ee12a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-06-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: extend tests on `--add-missing' and `--copy' a bit
+       * tests/add-missing.test: Fix typo in heading comments.  Try with
+       another testcase that install many (but not all) the auxiliary
+       scripts at once, and uses non-standard (but valid and documented)
+       setups (e.g., defining YACC in Makefile.am instead of calling
+       AC_PROG_YACC from configure.in).
+       * tests/copy.test: Reference `add-missing.test' in heading
+       comments.  Try few more test scenarios.
+
 2011-06-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: new test dedicated to `--add-missing' and `--copy'
index f16da396b18a5e8dcb2694b2d103fd37cf510f08..d6729f3768e050db348d29cf56417ac8f4088afc 100755 (executable)
@@ -17,7 +17,7 @@
 # Test that automake complains when required auxiliary files are not
 # found, and that `automake --add-missing' installs the files (and only
 # the files) it's supposed to, and that these files are symlinked by
-# default, but copied if the `--install' option is used.
+# default, but copied if the `--copy' option is used.
 
 . ./defs || Exit 1
 
@@ -297,4 +297,25 @@ AM_PATH_PYTHON
 python_PYTHON = foo.py
 END
 
+: %%% few unrelated auxiliary scripts together %%%
+check_ <<'END'
+== Files ==
+py-compile
+depcomp
+ylwrap
+config.sub
+config.guess
+== configure.in ==
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_PROG_CXX
+== Makefile.am ==
+PYTHON = python
+pythondir = $(prefix)/py
+YACC = bison -y
+bin_PROGRAMS = foo
+foo_SOURCES = bar.yxx baz.c++
+python_PYTHON = zardoz.py
+END
+
 :
index 714f7222a76e02709e0012a044a01600dbab1415..3eb1c9eac793fbd8433c2ec26f5fe8b94ae81275 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure `-c' works.  Report from Andris Pavenis.
+# See also the much more in-depth test `add-missing'.
 
 . ./defs || Exit 1
 
+# First a simple test, where the auxdir is automatically determined
+# by automake.
+
 : > Makefile.am
 rm -f install-sh
 
 $ACLOCAL
 $AUTOMAKE -c -a
+ls -l # For debugging.
 
 test -f install-sh
 test ! -h install-sh
 
+# Let's do a couple of more elaborated tests, this time with the auxdir
+# explicitly defined in configure.in.
+
+mkdir sub
+cd sub
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+bin_PROGRAMS = foo
+END
+
+$ACLOCAL
+
+# `automake -a' called without `-c' should create symlinks by default,
+# even when there is already a non-symlinked required auxiliary file.
+
+mkdir auxdir
+echo FAKE-DEPCOMP > auxdir/depcomp
+$AUTOMAKE -a
+ls -l auxdir # For debugging.
+test -f auxdir/install-sh
+test -h auxdir/install-sh
+test -f auxdir/depcomp
+test ! -h auxdir/depcomp
+test FAKE-DEPCOMP = `cat auxdir/depcomp`
+
+# `automake -a -c' should not create symlinks, even when there are
+# already symlinked required auxiliary files.
+
+rm -rf auxdir
+mkdir auxdir
+cd auxdir
+ln -s "$top_testsrcdir/lib/missing" "$top_testsrcdir/lib/install-sh" .
+cd ..
+
+$AUTOMAKE -a -c
+ls -l auxdir # For debugging.
+test -f auxdir/install-sh
+test -h auxdir/install-sh
+test -f auxdir/missing
+test -h auxdir/missing
+test -f auxdir/depcomp
+test ! -h auxdir/depcomp
+diff $top_testsrcdir/lib/depcomp auxdir/depcomp
+
 :