I've applied the attached patch to a temporary bug-fixing branch based
off of commit v1.11-377-g6edafbb "Implement EXTRA_maude_DEPENDENCIES for
programs and libraries.", merged into master, and pushed.

Regards,
  Stefano
From c92ac83b1329e8e2c24ff25974993cb4d520c2e3 Mon Sep 17 00:00:00 2001
Message-Id: <c92ac83b1329e8e2c24ff25974993cb4d520c2e3.1304773678.git.stefano.lattar...@gmail.com>
From: Stefano Lattarini <stefano.lattar...@gmail.com>
Date: Sat, 7 May 2011 12:58:51 +0200
Subject: [PATCH] tests: fix spurious failure of extradep.test on FreeBSD

* tests/extradep.test: When using `ls -t' to determine whether a
file has been updated, make sure to use as reference a file whose
timestamp is expected to be *strictly* older that that of the file
being checked.  This is required because at least FreeBSD `ls' do
not sort files with the same timestamp in alphabetical order when
using the `-t' option.
* tests/extradep2.test: Likewise.
---
 ChangeLog            |   11 +++++++++++
 tests/extradep.test  |    9 ++++++---
 tests/extradep2.test |    9 ++++++---
 3 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 356a9fc..614dcd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-05-07  Stefano Lattarini  <stefano.lattar...@gmail.com>
+
+	tests: fix spurious failure of extradep.test on FreeBSD
+	* tests/extradep.test: When using `ls -t' to determine whether a
+	file has been updated, make sure to use as reference a file whose
+	timestamp is expected to be *strictly* older that that of the file
+	being checked.  This is required because at least FreeBSD ls do
+	not sort files with the same timestamp in alphabetical order when
+	using the `-t' option.
+	* tests/extradep2.test: Likewise.
+
 2010-10-02  Ralf Wildenhues  <ralf.wildenh...@gmx.de>
 
 	Implement EXTRA_maude_DEPENDENCIES for programs and libraries.
diff --git a/tests/extradep.test b/tests/extradep.test
index d84182d..64385f1 100755
--- a/tests/extradep.test
+++ b/tests/extradep.test
@@ -46,8 +46,10 @@ EXTRA_bar_DEPENDENCIES = $(deps)
 
 EXTRA_DIST = foodep bardep
 
-bar-is-newer-than-libfoo.a:
-	test `ls -1t bar$(EXEEXT) libfoo.a | sed q` = bar$(EXEEXT)
+.PHONY: bar-has-been-updated
+bar-has-been-updated:
+	stat older bar$(EXEEXT) libfoo.a || : For debugging.
+	test `ls -t bar$(EXEEXT) older | sed q` = bar$(EXEEXT)
 END
 
 cat >libfoo.c <<'END'
@@ -94,10 +96,11 @@ $MAKE && Exit 1
 : >bardep
 
 $MAKE
+: > older
 $sleep
 touch libfoo.a
 $MAKE
-$MAKE bar-is-newer-than-libfoo.a
+$MAKE bar-has-been-updated
 
 $MAKE distcheck
 
diff --git a/tests/extradep2.test b/tests/extradep2.test
index 7d72e82..210dddf 100755
--- a/tests/extradep2.test
+++ b/tests/extradep2.test
@@ -42,8 +42,10 @@ EXTRA_bar_DEPENDENCIES = $(deps)
 
 EXTRA_DIST = bardep
 
-bar-is-newer-than-libfoo.la:
-	test `ls -1t bar$(EXEEXT) libfoo.la | sed q` = bar$(EXEEXT)
+.PHONY: bar-has-been-updated
+bar-has-been-updated:
+	stat older bar$(EXEEXT) libfoo.la || : For debugging.
+	test `ls -t bar$(EXEEXT) older | sed q` = bar$(EXEEXT)
 END
 
 cat >libfoo.c <<'END'
@@ -76,10 +78,11 @@ $MAKE && Exit 1
 : >bardep
 
 $MAKE
+: > older
 $sleep
 touch libfoo.la
 $MAKE
-$MAKE bar-is-newer-than-libfoo.la
+$MAKE bar-has-been-updated
 
 $MAKE distcheck
 
-- 
1.7.3.5

Reply via email to