bug-gnulib
[Top][All Lists]
Advanced

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

test-vc-list-files-git.sh failure


From: Bruno Haible
Subject: test-vc-list-files-git.sh failure
Date: Wed, 11 Jun 2008 02:56:19 +0200
User-agent: KMail/1.5.4

Hi Jim,

On Solaris 10, test-vc-list-files-git.sh fails for me:

FAIL: test-vc-list-files-git.sh
PASS: test-vc-list-files-cvs.sh

Here's the execution log with "set -x":

+ grep + GNU diff 
--version 
tmpdir=vc-git-4270
+ pwd 
+ trap st=$?; cd /home/haible/coreutils-6.12.29-a16be/gnulib-tests && rm -rf 
$tmpdir; exit $st 0 
+ trap (exit $?); exit $? 1 2 13 15 
fail=1
+ mkdir vc-git-4270 
+ cd vc-git-4270 
+ exit 77 
st=1
+ cd /home/haible/coreutils-6.12.29-a16be/gnulib-tests 
+ rm -rf vc-git-4270 
+ exit 1 
FAIL: test-vc-list-files-git.sh

So it seems the test detected the absence of the 'git' program and set
the return code to 77, but is converted to 1 somewhere. This fixes it for me.
OK to commit?


2008-06-10  Bruno Haible  <address@hidden>

        * tests/test-vc-list-files-git.sh: Make double use of 'exit'. Needed
        for $? to work inside the trap command, with Solaris /bin/sh.
        * tests/test-vc-list-files-cvs.sh: Likewise.

--- tests/test-vc-list-files-git.sh.orig        2008-06-11 02:55:29.000000000 
+0200
+++ tests/test-vc-list-files-git.sh     2008-06-11 02:50:34.000000000 +0200
@@ -31,7 +31,8 @@
 fail=1
 mkdir $tmpdir && cd $tmpdir &&
   # without git, skip the test
-  { ( git init -q ) > /dev/null 2>&1 || exit 77; } &&
+  # The double use of 'exit' is needed for the reference to $? inside the trap.
+  { ( git init -q ) > /dev/null 2>&1 || { (exit 77); exit 77; }; } &&
   mkdir d &&
   touch d/a b c &&
   git add . > /dev/null &&
--- tests/test-vc-list-files-cvs.sh.orig        2008-06-11 02:55:29.000000000 
+0200
+++ tests/test-vc-list-files-cvs.sh     2008-06-11 02:55:05.000000000 +0200
@@ -44,7 +44,8 @@
   ok=0
   mkdir $tmpdir && cd $tmpdir &&
     # without cvs, skip the test
-    { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 || exit 77; } &&
+    # The double use of 'exit' is needed for the reference to $? inside the 
trap.
+    { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 || { (exit 77); exit 77; }; 
} &&
     mkdir w && cd w &&
     mkdir d &&
     touch d/a b c &&





reply via email to

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