On 04/13/2012 12:27 PM, Dmitry V. Levin wrote:
> On Fri, Apr 13, 2012 at 10:52:32AM +0200, Stefano Lattarini wrote:
>
>> Hmm... actually, the fact that the above was run also when 'install-info'
>> might not be available was done *on purpose*, because the exporting of
>> 'AM_UPDATE_INFO_DIR' to a "no" value should prevent 'install-info' from
>> being run at all.
> 
> In that case, the test should be changed to ensure that $instdir/info/dir
> exists and contains appropriate data before running these chmod and grep
> commands.
> 
>> Have this patch motivated by a real failure (in which case, I'd like to
>> read details about it),
> 
> Yes, it was a real failure: chmod complained that $instdir/info/dir was
> missing.
> 
Thanks for the diagnosis and the explanation.  The attached patch (applied
to master) solves the problem.

Best regards,
  Stefano
>From 9414efaf789cddbb4434aad9218e2b396d8de87d Mon Sep 17 00:00:00 2001
Message-Id: <9414efaf789cddbb4434aad9218e2b396d8de87d.1334332663.git.stefano.lattar...@gmail.com>
From: Stefano Lattarini <stefano.lattar...@gmail.com>
Date: Fri, 13 Apr 2012 17:57:12 +0200
Subject: [PATCH] tests: avoid spurious failure when 'install-info' program is
 unavailable

>From a report by Dmitry V. Levin:
<http://lists.gnu.org/archive/html/automake-patches/2012-04/msg00085.html>

* t/install-info-dir.sh : When 'install-info' is unavailable, create a
dummy '${infodir}/dir' file by hand when that file is required by later
checks.

Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com>
---
 t/install-info-dir.sh |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/t/install-info-dir.sh b/t/install-info-dir.sh
index 9e40f54..d8b32d8 100755
--- a/t/install-info-dir.sh
+++ b/t/install-info-dir.sh
@@ -155,6 +155,10 @@ for val in no NO n; do
 done
 
 $MAKE install-info
+if test $have_installinfo != yes; then
+  echo 'Does nothing at all, but has a nice name' > $instdir/info/dir
+fi
+
 chmod a-w $instdir/info/dir
 for val in no NO n; do
   env AM_UPDATE_INFO_DIR="$val" $MAKE uninstall
-- 
1.7.9.5

Reply via email to