]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] tests: fix spurious failure under "make distcheck"
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 25 May 2012 08:29:02 +0000 (10:29 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 25 May 2012 09:10:20 +0000 (11:10 +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 <stefano.lattarini@gmail.com>
t/verbatim.sh

index da21c8cb972a8d388504079fd13ae87f4769d162..f0f6b7469f8ed165856fccd1a988ce66ebbc93d8 100755 (executable)
@@ -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