>From 1be71fc819e07c596e4d570844385fcd01f4cef0 Mon Sep 17 00:00:00 2001 Message-Id: From: Adam Sampson Date: Thu, 16 Aug 2012 18:54:41 +0200 Subject: [PATCH] tests: fix a timestamp race in python tests Fixes automake bug#12210. * t/python-missing.sh: Call aclocal and autoconf with the "--force" option. We need this because, on fast machines, it's possible for 'mypy.m4' and 'aclocal.m4' to end up with the same timestamp as configure, so autoconf (without the "--force" options) wouldn't bother to rebuild it, and would just rerun the previous AM_PATH_PYTHON test, succeeding rather than failing as expected. * t/python-am-path-iftrue.sh: Likewise. Co-authored-by: Stefano Lattarini Copyright-paperwork-exempt: yes Signed-off-by: Stefano Lattarini --- t/python-am-path-iftrue.sh | 6 ++++-- t/python-missing.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/t/python-am-path-iftrue.sh b/t/python-am-path-iftrue.sh index 3c5201f..d7ba436 100755 --- a/t/python-am-path-iftrue.sh +++ b/t/python-am-path-iftrue.sh @@ -45,8 +45,10 @@ cat > mypy.m4 << 'END' AM_PATH_PYTHON([0.0], [$PYTHON -c 'print("%u:%u" % (1-1, 2**0))' > py.out]) END -$ACLOCAL -$AUTOCONF +# The "--force" option here is truly needed to avoid potential timestamp +# races. See automake bug#12210. +$ACLOCAL --force +$AUTOCONF --force ./configure test x"$(cat py.out)" = x0:1 diff --git a/t/python-missing.sh b/t/python-missing.sh index c88a4f9..b0912d3 100755 --- a/t/python-missing.sh +++ b/t/python-missing.sh @@ -58,8 +58,10 @@ rm -rf autom4te*.cache # Will have to re-run aclocal. # Hopefully the Python team will never release such a version :-) echo 'AM_PATH_PYTHON([9999.9], [])' > mypy.m4 -$ACLOCAL -$AUTOCONF +# The "--force" options (here and below) are truly needed to avoid +# potential timestamp races. See automake bug#12210. +$ACLOCAL --force +$AUTOCONF --force ./configure >stdout 2>stderr && { cat stdout cat stderr >&2 -- 1.7.12.rc0.129.g61b472e