summaryrefslogtreecommitdiff
path: root/tests/cond24.test
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-05-26 15:42:02 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-05-26 22:32:40 +0200
commitfc5ac9a1e1573fa286da745491daaf373271578f (patch)
tree41519a29b186b5efb008e8a8f04b32b89048a934 /tests/cond24.test
parenteb147a19783b1cee960502697124e68e4c109df5 (diff)
downloadautomake-fc5ac9a1e1573fa286da745491daaf373271578f.tar.gz
tests: tweak and improve tests on Automake conditionals
The "avoid the requirement of a working compiler" we refer about below is obtained by disabling automatic dependency tracking and defining `CC' (and `EXEEXT', `OBJEXT', `CXX', etc., if needed) to dummy values, either directly in the `Makefile.am', or by AC_SUBST in `configure.in'. The "cosmetic changes" we refer about below consists in, e.g., adding a trailing `:' command to a script, using proper m4 quoting in `configure.in' files, adding commands that offer more debugging output, explicitly declaring phony targets as such in Makefiles, making use of idioms more consistent with those employed in other tests, following the GNU formatting standards more closely, etc. * tests/cond.test: Cosmetic changes. * tests/cond3.test: Likewise. * tests/cond10.test: Likewise. * tests/cond14.test: Likewise. * tests/cond15.test: Likewise. * tests/cond17.test: Likewise. * tests/cond40.test: Likewise. * tests/cond13.test: Likewise, and make grepping of the generated `Makefile.in' slightly stricter. * tests/cond6.test: Extend by also running ./configure, make and "make install". Few cosmetic changes. * tests/cond8.test: Likewise. * tests/cond2.test: Do few cosmetic changes. Make grepping of automake stderr stricter. * tests/cond20.test: Likewise. * tests/cond23.test: Likewise. * tests/cond24.test: Likewise. * tests/cond42.test: Likewise. * tests/cond46.test: Likewise. * tests/cond9.test: Move more checks in the `Makefile.am' instead of grepping make's output. * tests/cond38.test: Likewise. * tests/cond11.test: Likewise. Avoid the requirement of a working C compiler. * tests/cond16.test: Likewise. * tests/cond22.test: Likewise. * tests/cond30.test: Likewise. * tests/cond31.test: Likewise. * tests/cond4.test: Likewise, and drop the now-useless GNU make requirement as well. * tests/cond18.test: Likewise. * tests/cond19.test: Likewise. * tests/cond22.test: Likewise. * tests/cond25.test: Add trailing `:' command. * tests/cond26.test: Likewise. * tests/cond27.test: Likewise. * tests/cond28.test: Likewise. * tests/cond29.test: Use `unindent' function for better formatting. Other minor cosmetic changes. Use a `timeout' program (if it's available) to determine whether the script takes too long, instead of just hoping that the user will notice an abnormally long test execution time. * tests/cond33.test: Extend a bit. Fix heading comments. Few more cosmetic changes. * tests/cond37.test: Ensure verbose printing of captured make output. Minor cosmetic changes. * tests/cond34.test: Likewise. Avoid the requirement of a working C compiler. Make grepping of make output slightly stricter. * tests/cond35.test: Quote literal dots in grep regexp. Add extra debugging output. Minor cosmetic changes. * tests/cond36.test: Likewise. * tests/cond41.test: Do not simply check that aclocal fails, but also grep its stderr for the expected error message. * tests/cond43.test: Likewise (but the program being automake). Few cosmetic changes. * tests/condd.test: Avoid the requirement of a working C compiler. * tests/condman3.test: Extend by using more man pages and more manpage sections. * tests/condman.test: Removed, it's completely superseded by `condman3.test'. * tests/Makefile.am (TESTS): Update.
Diffstat (limited to 'tests/cond24.test')
-rwxr-xr-xtests/cond24.test7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/cond24.test b/tests/cond24.test
index 7bfa89f58..11f8d8701 100755
--- a/tests/cond24.test
+++ b/tests/cond24.test
@@ -22,15 +22,18 @@
cat >>configure.in <<EOF
AC_SUBST([foo], [bar])
AM_CONDITIONAL([COND], [true])
-AC_OUTPUT
EOF
cat >Makefile.am <<EOF
if COND
+## A dummy comment to change line numer.
foo = baz
endif
EOF
$ACLOCAL
AUTOMAKE_fails
-grep 'foo was already defined' stderr
+grep '^Makefile\.am:3:.* foo was already defined' stderr
+grep '^configure\.in:4:.*foo.* previously defined here' stderr
+
+: