From: Alexandre Duret-Lutz Date: Mon, 13 Jan 2003 11:06:38 +0000 (+0000) Subject: * tests/gnits2.test, tests/pr300-prog.test, tests/transform.test: X-Git-Tag: Release-1-7b~313 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=fa6eb0f94816ecbb8b00fc402100a2aa9d567048;p=automake.git * tests/gnits2.test, tests/pr300-prog.test, tests/transform.test: Move all `test -f' into Makefiles, so we can honor $(EXEEXT) when testing for programs. Reported by Richard Dawe. --- diff --git a/ChangeLog b/ChangeLog index fc702e2d..3b3a1b62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-01-13 Alexandre Duret-Lutz + + * tests/gnits2.test, tests/pr300-prog.test, tests/transform.test: + Move all `test -f' into Makefiles, so we can honor $(EXEEXT) when + testing for programs. + Reported by Richard Dawe. + 2003-01-10 Alexandre Duret-Lutz * Makefile.am (maintainer-check): Suggest using $sleep instead of diff --git a/tests/gnits2.test b/tests/gnits2.test index e3484f92..8b32f1f3 100755 --- a/tests/gnits2.test +++ b/tests/gnits2.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. # # This file is part of GNU Automake. # @@ -46,6 +46,10 @@ grep-stderr: ## Only three failures please. test `grep 'does not support --help' stderr | wc -l` = 3 test `grep 'does not support --version' stderr | wc -l` = 3 + +test-install: install + test -f ../inst-dir/bin/pfine$(EXEEXT) + test ! -f ../inst-dir/bin/fine$(EXEEXT) END echo 'int main () { return 0; }' > fubar.c @@ -96,9 +100,7 @@ cd build # Use --program-prefix to make sure the std-options check honors it. ../configure --prefix=`pwd`/../inst-dir --program-prefix=p $MAKE all -$MAKE install -test -f ../inst-dir/bin/pfine -test ! -f ../inst-dir/bin/fine +$MAKE test-install $MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k. cat stderr $MAKE grep-stderr diff --git a/tests/pr300-prog.test b/tests/pr300-prog.test index 29e2eea3..a593cd24 100755 --- a/tests/pr300-prog.test +++ b/tests/pr300-prog.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. # # This file is part of GNU Automake. # @@ -37,6 +37,19 @@ subdir_wish_SOURCES = a.c nobase_bin_PROGRAMS = subdir/want subdir_want_SOURCES = a.c + +test-all: all + test -f subdir/wish$(EXEEXT) + test -f subdir/want$(EXEEXT) +test-install: install + test -f inst/bin/wish$(EXEEXT) + test -f inst/bin/subdir/want$(EXEEXT) +test-uninstall: uninstall + test ! -f inst/bin/wish$(EXEEXT) + test ! -f inst/bin/subdir/want$(EXEEXT) +test-install-strip: install-strip + test -f inst/bin/wish$(EXEEXT) + test -f inst/bin/subdir/want$(EXEEXT) END cat > a.c << 'END' @@ -55,22 +68,7 @@ $ACLOCAL $AUTOCONF $AUTOMAKE --copy --add-missing ./configure --prefix `pwd`/inst -$MAKE - -test -f subdir/wish -test -f subdir/want - -$MAKE install - -test -f inst/bin/wish -test -f inst/bin/subdir/want - -$MAKE uninstall - -test -f inst/bin/wish && exit 1 -test -f inst/bin/subdir/want && exit 1 - -$MAKE install-strip - -test -f inst/bin/wish -test -f inst/bin/subdir/want +$MAKE test-all +$MAKE test-install +$MAKE test-uninstall +$MAKE test-install-strip diff --git a/tests/transform.test b/tests/transform.test index 66a54ba8..c368b0f0 100755 --- a/tests/transform.test +++ b/tests/transform.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. # # This file is part of GNU Automake. # @@ -34,6 +34,11 @@ cat >Makefile.am <<'EOF' bin_PROGRAMS = h bin_SCRIPTS = h.sh man_MANS = h.1 + +test-install: install + test -f inst/bin/gnu-h$(EXEEXT) + test -f inst/bin/gnu-h.sh + test -f inst/man/man1/gnu-h.1 EOF cat >h.c <<'EOF' @@ -53,9 +58,6 @@ $AUTOMAKE ./configure --program-prefix=gnu- --prefix `pwd`/inst $MAKE -$MAKE install -test -f inst/bin/gnu-h -test -f inst/bin/gnu-h.sh -test -f inst/man/man1/gnu-h.1 +$MAKE test-install $MAKE uninstall test `find inst/foo -type f -print | wc -l` = 0