automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] New test: distributed broken symlinks cause failure.


From: Stefano Lattarini
Subject: Re: [PATCH] New test: distributed broken symlinks cause failure.
Date: Sat, 19 Jun 2010 21:53:17 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

Hello Ralf.

I ping this again, since I'm pretty sure it has fallen off your radar.

I say so because, since the last ping, you have applied (or at least 
commented) much bigger and potentially more invasive patches of mine, 
but not this one.

BTW, In the meantime, I've also made some small improvements to the 
test script, which are IMO quite valuable.

Regards,
   Stefano
From bf254929cc79c1ae4d7572e64e5ac38da74255e8 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Sat, 15 May 2010 15:40:16 +0200
Subject: [PATCH] New test: distributed broken symlinks cause failure.

* tests/distlinksbrk.test: New test.
* tests/Makefile.am (TESTS): Updated accordingly.
---
 ChangeLog               |    7 ++++
 tests/Makefile.am       |    1 +
 tests/Makefile.in       |    1 +
 tests/distlinksbrk.test |   78 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 87 insertions(+), 0 deletions(-)
 create mode 100755 tests/distlinksbrk.test

diff --git a/ChangeLog b/ChangeLog
index b5f1433..8bb91ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-19  Stefano Lattarini  <address@hidden>
+
+       Add a test checking that distributed broken symlinks cause
+       `make dist' to fail.
+       * tests/distlinksbrk.test: New test.
+       * tests/Makefile.am (TESTS): Updated.
+
 2010-06-13  Stefano Lattarini  <address@hidden>
 
        Add useful comment in test script obsolete.test.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2771a66..ddb71e1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -301,6 +301,7 @@ distcom6.test \
 distcom7.test \
 distdir.test \
 distlinks.test \
+distlinksbrk.test \
 distname.test \
 dollar.test \
 dollarvar.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index db53cfb..04c73df 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -512,6 +512,7 @@ distcom6.test \
 distcom7.test \
 distdir.test \
 distlinks.test \
+distlinksbrk.test \
 distname.test \
 dollar.test \
 dollarvar.test \
diff --git a/tests/distlinksbrk.test b/tests/distlinksbrk.test
new file mode 100755
index 0000000..729ca05
--- /dev/null
+++ b/tests/distlinksbrk.test
@@ -0,0 +1,78 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that distributed broken symlinks cause `make dist' to fail, and
+# to do so with (mostly) meaningful diagnositic.
+
+. ./defs || Exit 1
+
+set -e
+
+# We need, for our broken symlinks, names that make it hard to get false
+# positives when grepping make output to look for them.
+lnk_base=BrknSymlnk
+lnk1=${lnk_base}__001
+lnk2=${lnk_base}__002
+lnka=${lnk_base}__aaa
+lnkb=${lnk_base}__bbb
+
+ln -s nonesuch $lnk1 || {
+  echo "$me: cannot create broken symlinks" >&2
+  Exit 77
+}
+
+ln -s "`pwd`/nonesuch" $lnk2
+
+ln -s $lnk1 $lnka
+ln -s $lnka $lnkb
+
+# Sanity checks.  Use `test -r', since Solaris Sh doesn't grok `test -e'.
+test ! -r $lnk1
+test ! -r $lnk2
+test ! -r $lnka
+test ! -r $lnkb
+test -h $lnk1
+test -h $lnk2
+test -h $lnka
+test -h $lnkb
+
+cat >>configure.in <<END
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+EXTRA_DIST = $lnk1 $lnk2 $lnka $lnkb
+END
+
+ls -l
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+# Distribution must fail.
+$MAKE distdir && Exit 1
+
+# Names of distributed broken symlinks should be reported in make output.
+$MAKE -k distdir >out 2>&1 || : # don't trust the exit status of make -k
+cat out
+$FGREP $lnk1 out
+$FGREP $lnk2 out
+$FGREP $lnka out
+$FGREP $lnkb out
+
+:
-- 
1.6.5


reply via email to

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