bug-automake
[Top][All Lists]
Advanced

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

Re: Automake 1.8 testsuite race condition


From: Alexandre Duret-Lutz
Subject: Re: Automake 1.8 testsuite race condition
Date: Thu, 22 Jan 2004 23:10:59 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

>>> "Andreas" == Andreas Schwab <address@hidden> writes:

 Andreas> The lex5 test can fail spuriously on fast machines, because the two
 Andreas> modifications to Makefile.am can occur in the same second, and the
 Andreas> filesystem may not have a finer precision for time stamps.

Thank you!  I'm installing the following on HEAD and branch-1-8.

2004-01-22  Alexandre Duret-Lutz  <address@hidden>

        * tests/lex5.test: Sleep before calling AUTOMAKE the second time,
        this fixes a spurious failure reported by Andreas Schwab.  Also
        make sure ylwrap is not installed unless needed, and exercise
        --no-force.

Index: tests/lex5.test
===================================================================
RCS file: /cvs/automake/automake/tests/lex5.test,v
retrieving revision 1.6
diff -u -r1.6 lex5.test
--- tests/lex5.test     14 Nov 2003 21:25:58 -0000      1.6
+++ tests/lex5.test     22 Jan 2004 22:05:51 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -71,6 +71,8 @@
 
 test -f foo/foo.c
 test -f foo/foo.o
+# ylwrap is not needed
+test ! -f ./ylwrap
 
 # Now, adds another lexer to test ylwrap.
 
@@ -80,7 +82,14 @@
 EXTRA_foo_foo_SOURCES = foo/foo2.l
 END
 
-$AUTOMAKE -a
+# Make sure Makefile.in has a new time stamp: the rebuild rules are
+# used below.  We do this after updating Makefile.am, that way we can
+# ensure that automake, even with --no-force, is not confused if the
+# new Makefile.am has the same time stamp as the older one (since the
+# output will change, --no-force should have no effect).
+$sleep
+
+$AUTOMAKE -a --no-force
 test -f ./ylwrap
 
 cd sub

-- 
Alexandre Duret-Lutz





reply via email to

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