automake-patches
[Top][All Lists]
Advanced

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

Modify some tests for absolute trees containing whitespace.


From: Ralf Wildenhues
Subject: Modify some tests for absolute trees containing whitespace.
Date: Mon, 26 Nov 2007 23:14:30 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

I'd appreciate a review on this.  Note it includes the nontrivial bits
from the multlib.test posted a while earlier.

My question about these changes it not whether they are correct in the
sense that the test is functional afterwards, but whether the tests
still exercise what they were originally intended to do.

Thanks,
Ralf

    Modify some tests for absolute trees containing whitespace.
    
    * tests/missing.test: Use "./missing" instead of "`pwd`/missing".
    * tests/missing2.test: Likewise.
    * tests/mmodely.test: Add `pwd` to $PATH instead of absolute
    references to myyacc.sh and mylex.sh.
    * tests/multlib.test: Likewise for mycc.
    * tests/txinfo26.test: Skip if `pwd` contains whitespace, as
    an absolute --srcdir does not work there.

diff --git a/tests/missing.test b/tests/missing.test
index 8f4cc9e..b425ddd 100755
--- a/tests/missing.test
+++ b/tests/missing.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -37,7 +37,7 @@ $AUTOMAKE --add-missing
 # Make sure we do use missing, even if the user exported AUTOCONF.
 # (We cannot export this new value, because it would be used by Automake
 # when tracing, and missing is no good for this.)
-MYAUTOCONF="`pwd`/missing --run $AUTOCONF"
+MYAUTOCONF="./missing --run $AUTOCONF"
 unset AUTOCONF
 
 ./configure AUTOCONF="$MYAUTOCONF"
diff --git a/tests/missing2.test b/tests/missing2.test
index 0236270..c091f83 100755
--- a/tests/missing2.test
+++ b/tests/missing2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -38,7 +38,7 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 
 # See missing.test for explanations about this.
-MYAUTOCONF="`pwd`/missing --run $AUTOCONF"
+MYAUTOCONF="./missing --run $AUTOCONF"
 unset AUTOCONF
 
 ./configure AUTOCONF="$MYAUTOCONF"
diff --git a/tests/mmodely.test b/tests/mmodely.test
index 49b16e1..19877b6 100755
--- a/tests/mmodely.test
+++ b/tests/mmodely.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2007  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -70,14 +70,21 @@ $AUTOMAKE -a
 ./configure
 $MAKE
 
-echo 'echo "$@" >y.tab.c' > myyacc.sh
-echo 'echo "$@" >lex.yy.c' > mylex.sh
+cat >myyacc.sh <<'END'
+#! /bin/sh
+echo "$@" >y.tab.c
+END
+cat >mylex.sh <<'END'
+echo "$@" >lex.yy.c
+END
+chmod +x myyacc.sh mylex.sh
+PATH="`pwd`:$PATH"
 
 # make maintainer-clean; ./configure; make should always work,
 # per GNU Standard.
 $MAKE maintainer-clean
 ./configure
-YACC="$SHELL `pwd`/myyacc.sh" LEX="$SHELL `pwd`/mylex.sh" \
+YACC="myyacc.sh" LEX="mylex.sh" \
    LEX_OUTPUT_ROOT='lex.yy' $MAKE -e zardoz.c joe.c
 grep zardoz.y zardoz.c
 grep joe.l joe.c
diff --git a/tests/multlib.test b/tests/multlib.test
index 05dd6ee..b4e406a 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -49,6 +49,7 @@ gcc ${1+"$@"}
 END
 
 chmod +x mycc
+PATH=`pwd`:$PATH
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = @subdirs@
@@ -130,7 +131,7 @@ cd ..
 # Check VPATH builds
 mkdir build
 cd build
-../configure --enable-multilib CC=`pwd`/../mycc
+../configure --enable-multilib CC=mycc
 $MAKE
 $MAKE install
 $MAKE distcleancheck
@@ -138,5 +139,5 @@ $MAKE distcleancheck
 # Check standard builds.
 cd ..
 # Why to I have to specify --with-target-subdir?
-./configure --enable-multilib --with-target-subdir=. CC=`pwd`/mycc
+./configure --enable-multilib --with-target-subdir=. CC=mycc
 $MAKE
diff --git a/tests/txinfo26.test b/tests/txinfo26.test
index 4d75589..4899986 100755
--- a/tests/txinfo26.test
+++ b/tests/txinfo26.test
@@ -51,6 +51,12 @@ $AUTOCONF
 ./configure
 $MAKE
 $MAKE distclean
+
+# We do not require this to work with a directory that contains white space.
+case `pwd` in
+  *\ * | *\    *) exit 77;;
+esac
+
 mkdir build
 cd build
 ../configure "--srcdir=`pwd`/.." "--prefix=`pwd`/_inst" 
"--infodir=`pwd`/_inst/info"




reply via email to

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