libtool/libtool-2.4.4-race-in-acloc...

34 lines
1.2 KiB
Diff

From 2ad0598f0d8cd8c8532a2c34ea1b06c71901047d Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Mon, 15 Dec 2014 13:42:25 +0100
Subject: [PATCH] tests: fix race in aclocal/autoheader calls
Put the sleep 1 after aclocal run, same as autoreconf does. This
guarantees that 'aclocal.m4' will have smaller timestamp than
'config.h.in' and avoids re-running autoheader later on.
* tests/testsuite.at (LT_AT_ACLOCAL): Sleep sec after aclocal run.
---
tests/testsuite.at | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 76ed722..2a359a3 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -123,6 +123,11 @@ AT_DATA([acinclude.m4],
[m4_define([AC_CONFIG_MACRO_DIRS], m4_defn([AC_CONFIG_MACRO_DIR]))])
]])
LT_AT_CHECK([$ACLOCAL $1$macro_dir], [0], [ignore], [ignore])
+# After the 'aclocal' run sleep 1 second to guarantee that aclocal.m4 is going
+# to have older timestamp than other autotools later-generated files (concretely
+# for libtool case, we speak about config.h.in generated autoheader).
+# Autoreconf does the same (after the first aclocal run).
+sleep 1
AT_XFAIL_IF([test no = "$ACLOCAL"])
AT_KEYWORDS([automake])
])
--
1.9.3