From: Stefano Lattarini Date: Mon, 13 Jun 2011 17:42:52 +0000 (+0200) Subject: tests: extend tests on `--add-missing' and `--copy' a bit X-Git-Tag: ng-0.5a~89^2~188^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb4ca27a3992f229def170dffeb2c1c8c23d9478;p=thirdparty%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index a41dfdf78..7139ccbdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-06-13 Stefano Lattarini + + 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 tests: new test dedicated to `--add-missing' and `--copy' diff --git a/tests/add-missing.test b/tests/add-missing.test index f16da396b..d6729f376 100755 --- a/tests/add-missing.test +++ b/tests/add-missing.test @@ -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 + : diff --git a/tests/copy.test b/tests/copy.test index 714f7222a..3eb1c9eac 100755 --- a/tests/copy.test +++ b/tests/copy.test @@ -16,16 +16,74 @@ # along with this program. If not, see . # 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 < Makefile.am < 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 + :