automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automake 1.7.2 & DJGPP: tests: test -f and executable


From: Alexandre Duret-Lutz
Subject: Re: automake 1.7.2 & DJGPP: tests: test -f and executable
Date: Mon, 13 Jan 2003 12:06:14 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

>>> "Richard" == Richard Dawe <address@hidden> writes:

 Richard> Hello.

 Richard> Some of the tests look for executables using test
 Richard> -f. Under DJGPP the tests have an executable extension
 Richard> of .exe, so test -f won't find them in the tests as
 Richard> they're currently coded.

Thanks.  The other tests check these files from the Makefile so
we can use the local definitions of $(EXEEXT).  I've installed
the following change on HEAD and branch-1-7.

2003-01-13  Alexandre Duret-Lutz  <address@hidden>

        * 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.

Index: tests/gnits2.test
===================================================================
RCS file: /cvs/automake/automake/tests/gnits2.test,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 gnits2.test
--- tests/gnits2.test   30 Nov 2002 20:41:39 -0000      1.4.2.1
+++ tests/gnits2.test   13 Jan 2003 10:53:46 -0000
@@ -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 @@
 ## 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 @@
 # 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
Index: tests/pr300-prog.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr300-prog.test,v
retrieving revision 1.4
diff -u -r1.4 pr300-prog.test
--- tests/pr300-prog.test       8 Sep 2002 13:07:55 -0000       1.4
+++ tests/pr300-prog.test       13 Jan 2003 10:53:46 -0000
@@ -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 @@
 
 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 @@
 $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
Index: tests/transform.test
===================================================================
RCS file: /cvs/automake/automake/tests/transform.test,v
retrieving revision 1.3
diff -u -r1.3 transform.test
--- tests/transform.test        8 Sep 2002 13:07:56 -0000       1.3
+++ tests/transform.test        13 Jan 2003 10:53:46 -0000
@@ -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 @@
 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 @@
 
 ./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

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]