tests: fix a timestamp issue, and other minor buglets
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 20 Feb 2012 13:04:46 +0000 (14:04 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 21 Feb 2012 08:51:59 +0000 (09:51 +0100)
Reported by Panther Martin in automake bug#10848.

* tests/conffile-leading-dot.test: Add a proper '$sleep' invocation,
to avoid spurious failures on fast systems without sub-second
timestamp resolutions.  Add other minor related and unrelated
improvements and fixlets since we are at it.

THANKS
tests/conffile-leading-dot.test

diff --git a/THANKS b/THANKS
index 3d1f75a..36f8f4b 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -267,6 +267,7 @@ Olivier Louchart-Fletcher olivier@zipworld.com.au
 Olly Betts             olly@muscat.co.uk
 Oren Ben-Kiki          oren@ben-kiki.org
 Owen Taylor            otaylor@redhat.com
+Panther Martin         mrsmiley98@lycos.com
 Patrick Welche         prlw1@newn.cam.ac.uk
 Patrik Weiskircher     me@justp.at
 Paul Berrevoets                paul@swi.com
index bfe81b5..732e10f 100755 (executable)
@@ -29,9 +29,7 @@ AC_CONFIG_FILES([./foo:a.in:b.in:c.in])
 AC_OUTPUT
 END
 
-echo foo = barbarbar > Makefile.am
-
-touch a.in b.in c.in
+touch a.in b.in c.in Makefile.am
 
 $ACLOCAL
 
@@ -44,16 +42,19 @@ grep "^configure\.in:4:.* omit leading '\\./'" stderr
 grep "^configure\.in:4:.*remake rules might be subtly broken" stderr
 
 # Check that our warning was actually justified.
+sed 's/^AM_INIT_AUTOMAKE/&([-Wall -Wno-unsupported])/' <configure.in >t
+mv -f t configure.in
+rm -rf autom4te*.cache
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE -Wall -Wno-unsupported
 ./configure
 $MAKE
-grep barbarbar Makefile
-# No need to sleep here, configure did that for us already.
-echo foo = bazbazbaz > Makefile.am
+$sleep
+touch Makefile.am
 # Check that remake rules do truly break -- otherwise automake is
 # giving a bogus warning.
-$MAKE 2>stderr && { cat stderr >&2 Exit 1; }
+$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep "config\\.status:.*invalid argument.*Makefile" stderr