Subject: Re: bug#11909: automake 1.12.2 fails t/self-check-explicit-skips.sh on Mac OS X 10.7.4

From: Stefano Lattarini <[email-masked]>
Date: Sat, 14 Jul 2012 13:58:45 +0200

tags 11909 + patch
thanks

On 07/14/2012 01:38 PM, Stefano Lattarini wrote:
> severity 11909 minor
> thanks
> 
> On 07/11/2012 02:37 PM, Max Horn wrote:
>> Hi there,
>>
> Hi Max, sorry for the delay.
> 
>> turns out there is one more test failure on Mac OS X 10.7.4,
>> in t/self-check-explicit-skips.sh.
>>
> I can reproduce the issue with bash 3.2 on Debian.
> 
>> Looking at the code, I don't understand it at all, so please don't
>> torch me if this isn't a bug in the automake test suite but rather
>> in Mac OS X :).
>>
> It's probably a limitation on older bash versions, that breaks an
> invariant the Automake testsuite framework expects.  Probably nothing
> serious, but I will attempt a fix since I can reproduce the problem.
> 
>> I just want to know what is causing this and whether I should ignore
>> it, disable the test, or apply some patch.
>>
> I hope I'll manage to fix it soon, but for the moment, just ignore it.
> 
OK, the issue was due to the fact that the test was still trying use cases
that are no more relevant nor supported now that we've got rid of the need
to use the 'Exit' function.  The attached patch seems to fix the problem.

Can you confirm it works?

Regards,
  Stefano
>From 9a2febc11c729d7c84809b1fe89333361bf6b769 Mon Sep 17 00:00:00 2001
Message-Id: <9a2febc11[email-masked]>
From: Stefano Lattarini <[email-masked]>
Date: Sat, 14 Jul 2012 13:56:34 +0200
Subject: [PATCH] self tests: avoid spurious failures on older bash

Fixes automake bug#11909.

* t/self-check-explicit-skips.sh: Remove or rework few checks for use
cases that are no more relevant nor supported now that we've got rid
of the need to use the 'Exit' function explicitly.  Make the other
existing checks stricter.

Signed-off-by: Stefano Lattarini <[email-masked]>
---
 t/self-check-explicit-skips.sh |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/t/self-check-explicit-skips.sh b/t/self-check-explicit-skips.sh
index eb60dc2..32f69291 100755
--- a/t/self-check-explicit-skips.sh
+++ b/t/self-check-explicit-skips.sh
@@ -36,22 +36,19 @@ run_dummy_test ()
   " dummy.sh
 }
 
-run_dummy_test '(exit 77); exit 77'
+run_dummy_test 'exit 77'
 test $? -eq 77 || exit 1
 
 run_dummy_test 'sh -c "exit 77"' am_explicit_skips=no
 test $? -eq 77 || exit 1
 
-run_dummy_test '(exit 77); exit 77' am_explicit_skips=yes 
+run_dummy_test '$PERL -e "exit 77"; true' am_explicit_skips=yes 
 test $? -eq 78 || exit 1
 
-run_dummy_test 'sh -c "exit 77"' am_explicit_skips=y
+run_dummy_test 'sh -c "exit 77"; exit 0' am_explicit_skips=y
 test $? -eq 78 || exit 1
 
-run_dummy_test 'exit 77' am_explicit_skips=yes
-test $? -eq 77 || exit 1
-
-run_dummy_test 'skip_ "foo"' am_explicit_skips=y
+run_dummy_test 'skip_ "foo"; :' am_explicit_skips=y
 test $? -eq 77 || exit 1
 
 :
-- 
1.7.9.5