automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [FYI] tests: fix spurious failure under "make distcheck"


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] tests: fix spurious failure under "make distcheck"
Date: Fri, 25 May 2012 11:09:48 +0200

* t/verbatim.sh: This test copied in files from the directory of Automake
internal '.am' fragments, and then overwrote one of them with 'cat >'.
But that is bound to fail under a "make distcheck", because in that case
all of the source directory (in particular the '.am' files in it) are made
read only.  This can be fixed by unlinking the file we want to overwrite
before actually writing to it.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/verbatim.sh |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/t/verbatim.sh b/t/verbatim.sh
index da21c8c..f0f6b74 100755
--- a/t/verbatim.sh
+++ b/t/verbatim.sh
@@ -45,6 +45,10 @@ cp "$am_amdir"/*.am ./am
 
 echo pkgdata_DATA = configure.ac > Makefile.am
 
+# The '.am' file are read-only when this test is run under
+# "make distcheck", so we need to unlink any of them we want
+# to overwrite.
+rm -f am/data.am
 cat > am/data.am << 'END'
 include 0.am
 include 1.am
-- 
1.7.9.5




reply via email to

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