[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] {testsuite-work} tests: extend tests on `--add-missing' and `--c
From: |
Stefano Lattarini |
Subject: |
[PATCH] {testsuite-work} tests: extend tests on `--add-missing' and `--copy' a bit |
Date: |
Mon, 13 Jun 2011 19:48:11 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
On Monday 13 June 2011, Stefano Lattarini wrote:
> References:
> <http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00048.html>
> <http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00065.html>
>
> I've pushed this patch now.
>
> Regards,
> Stefano
>
I'd like also to add the attached patch, which offers a small increase
in coverage of possible use cases. I'll push in 48 hours if there is no
objection by then.
Regards,
Stefano
From fb4ca27a3992f229def170dffeb2c1c8c23d9478 Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Mon, 13 Jun 2011 19:42:52 +0200
Subject: [PATCH] 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.
---
ChangeLog | 11 +++++++++
tests/add-missing.test | 23 ++++++++++++++++++-
tests/copy.test | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 91 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a41dfdf..7139ccb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-06-13 Stefano Lattarini <address@hidden>
+
+ 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 <address@hidden>
tests: new test dedicated to `--add-missing' and `--copy'
diff --git a/tests/add-missing.test b/tests/add-missing.test
index f16da39..d6729f3 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 714f722..3eb1c9e 100755
--- a/tests/copy.test
+++ b/tests/copy.test
@@ -16,16 +16,74 @@
# 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
+
:
--
1.7.2.3
- Re: [PATCH 1/3] {testsuite-work} tests defs: better requirements for XSI shells, (continued)
- [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/', Stefano Lattarini, 2011/06/06
- Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/', Peter Rosin, 2011/06/07
- Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/', Stefano Lattarini, 2011/06/07
- Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/', Peter Rosin, 2011/06/07
- Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/', Stefano Lattarini, 2011/06/07
- [PATCH] {testsuite-work} tests: new test dedicated to `--add-missing' and `--copy' (was: Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/'), Stefano Lattarini, 2011/06/07
- Re: [PATCH] {testsuite-work} tests: new test dedicated to `--add-missing' and `--copy' (was: Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/'), Stefano Lattarini, 2011/06/08
- Re: [PATCH] {testsuite-work} tests: new test dedicated to `--add-missing' and `--copy' (was: Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/'), Stefano Lattarini, 2011/06/10
- Re: [PATCH] {testsuite-work} tests: new test dedicated to `--add-missing' and `--copy' (was: Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/'), Stefano Lattarini, 2011/06/12
- [PATCH] {testsuite-work} tests: extend tests on `--add-missing' and `--copy' a bit,
Stefano Lattarini <=
- Re: [PATCH] {testsuite-work} tests: extend tests on `--add-missing' and `--copy' a bit, Stefano Lattarini, 2011/06/16
[PATCH 3/3] {testsuite-work} tests: `lib/' shell scripts transparently tested also with $SHELL, Stefano Lattarini, 2011/06/06
Re: [PATCH 3/3] {testsuite-work} tests: `lib/' shell scripts transparently tested also with $SHELL, Stefano Lattarini, 2011/06/07
[PATCH] {testsuite-work} tests: remove 'test_prefer_config_shell' from the environment (was: Re: [PATCH 3/3] {testsuite-work} tests: `lib/' shell scripts transparently tested also with $SHELL), Stefano Lattarini, 2011/06/13