[Top][All Lists]
[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, 15 May 2010 15:46:15 +0200 |
User-agent: |
KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) |
Ping ping?
Since i was at it, I tweaked the patch slighty (hopefully improving it ;-)
Regards,
Stefano
From d1ca18be617677426e16c84e7bbf2e35090f0735 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 | 70 +++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 79 insertions(+), 0 deletions(-)
create mode 100755 tests/distlinksbrk.test
diff --git a/ChangeLog b/ChangeLog
index 71b0d9b..fe9649b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-05-15 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-04-25 Ralf Wildenhues <address@hidden>
Warning and error message formatting cleanups.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cff34c5..6b11cc2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -287,6 +287,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 3ff9012..e55cd2c 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -528,6 +528,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..405f383
--- /dev/null
+++ b/tests/distlinksbrk.test
@@ -0,0 +1,70 @@
+#! /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
+
+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
+grep lnk1 out
+grep lnk2 out
+grep lnka out
+grep lnkb out
+
+:
--
1.6.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] New test: distributed broken symlinks cause failure.,
Stefano Lattarini <=