automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Testsuite: fix spurious failure of instspc.test w.r.t. AT&T


From: Stefano Lattarini
Subject: Re: [PATCH] Testsuite: fix spurious failure of instspc.test w.r.t. AT&T Ksh.
Date: Sat, 30 Jan 2010 01:14:16 +0100
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.2; i686; ; )

Rebased against master, with proper bumping of copyright years in the 
modified test script.

Regards,
     Stefano
 
From 98a5493af47a328e18bbfa2910d30887b585d32c Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Sat, 30 Jan 2010 00:48:53 +0100
Subject: [PATCH] Testsuite: fix a spurious failure w.r.t. AT&T Ksh.

* tests/instspc.test: Update copyright years.
($ocwd): New variable, holding the full path of the current
directory.
(Loop on $file): Use `cd $ocwd' instead of `cd ..' to chdir
back to the previous directory; this is required to work around
a bug of AT&T Korn shell w.r.t. directories named `...'.
---
 ChangeLog          |   10 ++++++++++
 tests/instspc.test |   14 ++++++++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index da01f8f..5d5052f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-01-30  Stefano Lattarini  <address@hidden>
+
+       Testsuite: fix a spurious failure w.r.t. AT&T Ksh.
+       * tests/instspc.test: Update copyright years.
+       ($ocwd): New variable, holding the full path of the current
+       directory.
+       (Loop on $file): Use `cd $ocwd' instead of `cd ..' to chdir
+       back to the previous directory; this is required to work around
+       a bug of AT&T Korn shell w.r.t. directories named `...'.
+
 2010-01-24  Ralf Wildenhues  <address@hidden>
 
        Fix silent-rules output for disabled dependency tracking.
diff --git a/tests/instspc.test b/tests/instspc.test
index 414b3e5..38a9446 100755
--- a/tests/instspc.test
+++ b/tests/instspc.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 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
@@ -121,13 +121,16 @@ for file in \
   "a${sp}b" "a${sp}${sp}b" "a${lf}b" ... a:
 do
   for test in build install; do
+
+    ocwd=`pwd`
+
     case $test in
     build)
       build=$file
-      dest=`pwd`/sub1;;
+      dest=$ocwd/sub1;;
     install)
       build=sub1
-      dest=`pwd`/$file;;
+      dest=$ocwd/$file;;
     esac
 
     # Make sure this system supports this character in file names.
@@ -140,9 +143,12 @@ do
     DESTDIR=$dest file=$file $MAKE -e test-install-sep ||
       eval "${test}_failures=\"\$${test}_failures$lf\$file\""
 
-    cd ..
+    # Don't use `cd ..', or a nasty bug of AT&T Ksh will be triggered
+    # when `$file' is `...'
+    cd "$ocwd"
 
     rm -fr sub1 "./$file"
+
   done
 done
 
-- 
1.6.5


reply via email to

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