* tests/defs.in: Quote $srcdir, $PATH; skip libtool and gettext
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 8 Dec 2007 10:10:39 +0000 (11:10 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 8 Dec 2007 10:10:39 +0000 (11:10 +0100)
tests if the absolute source or build tree name contain whitespace.

ChangeLog
tests/defs.in

index 135fa7c..e6811bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-12-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * tests/defs.in: Quote $srcdir, $PATH; skip libtool and gettext
+       tests if the absolute source or build tree name contain whitespace.
+
        Modify some tests for absolute trees containing whitespace.
        * tests/missing.test: Use "./missing" instead of "`pwd`/missing".
        * tests/missing2.test: Likewise.
index 107bfe8..c15c530 100644 (file)
@@ -49,11 +49,11 @@ if test -z "$srcdir"; then
    VERBOSE=x
    # compute $srcdir.
    srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
-   test $srcdir = $0 && srcdir=.
+   test "$srcdir" = $0 && srcdir=.
 else :; fi
 
 # Ensure $srcdir is set correctly.
-test -f $srcdir/defs.in || {
+test -f "$srcdir/defs.in" || {
    echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
    exit 1
 }
@@ -92,7 +92,7 @@ export ACLOCAL_TESTSUITE_FLAGS
 test -z "$AUTOMAKE" && AUTOMAKE="automake-@APIVERSION@ --foreign -Werror -Wall"
 
 PATH="`pwd`@PATH_SEPARATOR@$PATH"
-echo $PATH
+echo "$PATH"
 # Some shells forget to export modified environment variables.
 # (See note about `export' in the Autoconf manual.)
 export PATH
@@ -260,7 +260,7 @@ signal=0
 
 # Copy in some files we need.
 for file in install-sh missing depcomp; do
-   cp $srcdir/../lib/$file $testSubDir/$file || exit 1
+   cp "$srcdir/../lib/$file" "$testSubDir/$file" || exit 1
 done
 
 cd ./$testSubDir
@@ -320,6 +320,12 @@ case $required in
       *libtool* ) test $libtool_found = yes || exit 77 ;;
       *gettext* ) test $gettext_found = yes || exit 77 ;;
     esac
+    # Libtool cannot cope with spaces in the build tree.  Our testsuite setup
+    # cannot cope with spaces in the source tree name for Libtool and gettext
+    # tests.
+    case $srcdir,`pwd` in
+      *\ * | *\        *) exit 77 ;;
+    esac
     ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I $aclocaldir"
     ;;
 esac