[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [FYI] {testsuite-work} tests: use `$SHELL' to run the shell scripts
From: |
Stefano Lattarini |
Subject: |
Re: [FYI] {testsuite-work} tests: use `$SHELL' to run the shell scripts from `lib/' |
Date: |
Sun, 5 Jun 2011 12:57:15 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
On Sunday 05 June 2011, Peter Rosin wrote:
> Den 2011-06-04 11:24 skrev Stefano Lattarini:
> > On Saturday 04 June 2011, Peter Rosin wrote:
> >> Den 2011-06-02 17:36 skrev Stefano Lattarini:
> >>> This should offer greater testsuite coverage for those developers
> >>> that override CONFIG_SHELL at configure time in order to test more
> >>> shells on a single system, instead of just the default `/bin/sh'.
> >>
> >> Do we not want to test these scripts in the same way that they are
> >> later used?
> >>
> > Absolutely -- but I think that, ideally, all the Automake-provided shell
> > scripts should be run with configure-time detected $SHELL. To be honest,
> > I thought this was already the case, but now I see that it is not always
> > true unfortunately. For example, it's not for the `compile' script (see
> > `m4/minuso.m4') or the `py-compile' script (see `automake.in' and
> > `lib/am/python.am'), while it is true for `mkinstalldirs' and `depcomp'
> > (see `automake.in') as for `ylwrap' (see `lib/am/yacc.am' and
> > `lib/am/lex.am'), `mdate-sh' (see `lib/am/texi-vers.am') and `elisp-comp'
> > (see `lib/am/lisp.am').
> >
> > I think this inconsistency should be fixed by always using $(SHELL) to
> > run the Automake-provided shell scripts (that might turn out a little
> > tricky for `compile', though). And an addition to `HACKING' in this
> > respect would be nice too.
>
> And I don't see how the inconsistency /can/ be reasonably solved, since
> e.g the ar-lib script currently has to be explicitly used by the end
> user (AR="/here/is/ar-lib lib" -> AR="$SHELL /here/is/ar-lib lib").
>
(BTW, this would be another good reason to resurrect you patch on
AM_PROG_AR; our disagreement there ended up with me acknowledging
that you were 90% right, so it shouldn't be too difficul to reach
consensus now).
> Now, the ar-lib script is perhaps not the best example, but the same
> holds for the compile script since not all projects do AM_PROG_CC_C_O.
> Your patch changes the rules for the scripts,
>
Not exactly true; it only changes the rules for the tests on these scripts.
Yes, this implies that now the usage we care *more* about for these scripts
is when they are run with configure-selected $SHELL; but that doesn't mean
we don't care about keeping the them runnable with /bin/sh anymore.
> and the reason is a dubious argument to increase testsuite coverage,
> see more below.
>
> We both think the testsuite should execute the script as they are executed
> when they are used. And I think that it should only involve $SHELL if there
> is a guarantee that $SHELL will always be used, otherwise there will be
> inconsistencies.
>
> It should also be safe to copy-paste things to the command line and
> re-run commands (i.e. $SHELL has to be expanded when displayed, I don't
> know if this is already the case).
>
Yes, that should be the case when `xtrace' is in effect:
$ sh -c 'SHELL=ksh; set -x; :; $SHELL -c ":"'
+ :
+ ksh -c :
> >> Isn't that more important compared to the convenience
> >> it might be to test things using various shells on a single machine?
> >>
> > Yes, but I consider this convenience more an added value than a
> > basic motivation. A believe which I failed to reflect properly
> > in the ChangeLog entry, BTW :-( Sorry about that, my bad.
> >
> > If you have any improvement for the ChangeLog entry to propose, I'm
> > all ears.
> >
> >> If we don't run the scripts with /bin/sh in the testsuite, we might
> >> miss some instance where the script is broken on the "lesser" shell
> >> even though the path taken through the script _should_ not reguire
> >> an xsi-shell, e.g. in the compile2.test case.
> >>
> > $SHELL does not have to be an "xsi-shell"; in fact, when testing on
> > solaris, I usually force CONFIG_SHELL (and thus SHELL) to `/bin/sh',
> > which is not even a POSIX shell (e.g., it has no `$(...)' support).
> > And I'm assuming that the Automake developers are prepared override
> > CONFIG_SHELL by hand to point to a lesser shell, on systems where that
> > can offer an increased testsuite coverage. That's what I usually do,
> > and the same (if I'm not badly mistaken) does Ralf.
>
> I didn't say that $SHELL is always an xsi-shell. Some tests (such as
> compile2.test) were once written to run the scripts with /bin/sh,
> whatever that might be. Now that scripts are run by $SHELL, which when
> /bin/sh is a "lesser" shell, is more likely to be bash you have actually
> reduced coverage (not for Solaris with GNU bash installed perhaps,
> because you seem to have that covered, but something else which you did
> not think of).
>
> Yes, I understand that *you* (and Ralf) can test a handful (or whatever)
> of shells easily when $SHELL runs the scripts, but this "increase" in
> coverage comes with the cost that all systems with *both* a weird
> /bin/sh and a better shell available will not run the scripts with
> the weird /bin/sh, thus reducing the testsuite coverage.
>
> I.e. the gain is that *you* can do lab style tests more easily, but the
> loss is less testsuite coverage in the wild. It just has to be better to
> fix the lab instead.
>
OK, you've made good points as usual.
I now think I should revert this version of the patch, and repropose it so
that the affected tests will run the scripts once with /bin/sh and once with
$SHELL (skipping these latter checks if $SHELL happens to be /bin/sh). This
should cater both for the "lab" and the "wild".
Oh, and we'll need a couple of new requirements `shell-not-bin-sh' and
`xsi-bin-sh' in 'tests/defs' (and the `xsi-shell' requirement could be
adjusted to check $SHELL instead of the shell that is running the test
script itself). These changes could be proposed in preliminary patches.
Would this scenario be more acceptable for you? FWIW, I think it would
be an improvement both over the previous situation and my previous patch.
BTW, the "reverting patch" is attached, for reference.
> >> I.e. IMHO, it _might_ be ok to do this change for tests that require
> >> an xsi-shell, but otherwise not. I think it's better to keep skipping
> >> the tests if not using an xsi-shell because the "increased coverage"
> >> argument has flaws:
> >> 1. it decreases test coverage for code intended for /bin/sh
> >>
> > But the code tested is intended for $SHELL, not for /bin/sh; and forcing
> > the use of /bin/sh can indeed *reduce* coverage.
>
> What makes you say that the compile script is intended to be executed by
> $SHELL? How will you guarantee that compile is always executed by $SHELL?
> That seems pretty hard to fix, and it will make it more difficult to use
> compile in the correct way. It will also needlessly clutter up the commands
> with $SHELL once the compile script is in effect.
>
> Do you see how this change causes a regression in the 'compile' interface.
> You are saying that it is no longer supported (it's not tested anyway) to
> do:
>
> .../configure "CC=/here/is/compile foocc"
>
> for projects that do not bother to AM_PROG_CC_C_O. Which is a fair share
> or projects.
>
> If you do go through with this, the interface change should be mentioned
> in NEWS. By the way, how should the user specify CC above? Should the
> user guess how configure sets $SHELL? Should the user re-run configure
> after looking up what $SHELL was set to? Painful.
>
These objections are wrong. To reiterate what I've said before, I wasn't
saying that we should drop support for plain /bin/sh in the Automake
provided scripts (I agree that would be ridicoulous); I was proposing that
the *primary* concern of our tests on those scripts should shift from
/bin/sh to $SHELL. This made sense because Automake-generated Makefiles
(mostly) use $(SHELL) to run those scripts. But given my new proposal
above, all this is moot now.
> BTW, I only know about compile and ar-lib, and can't speak for the other
> scripts affected by this patch.
>
> > In fact, by forcing the use of /bin/sh when testing the Automake-provided
> > scripts, you ignore the real-life possibility of those scripts being run
> > with, say, /bin/ksh instead, in case `configure' determined that ksh is
> > a better shell, and set CONFIG_SHELL (and thus SHELL) accordingly. Now,
> > what happens if the tested script tickles a bug in /bin/ksh but not in
> > /bin/sh? Your test, which uses /bin/sh unconditionally, passes, but when
> > someone later uses an Automake-generated Makefile making use of that same
> > script on the *same* system you've tested, he might experience a failure
> > that have escaped you, because configure has chosen /bin/ksh over /bin/sh
> > for him.
> >
> >> *snip*
> >>
> >>> diff --git a/tests/compile3.test b/tests/compile3.test
> >>> index f949d1c..141a17a 100755
> >>> --- a/tests/compile3.test
> >>> +++ b/tests/compile3.test
> >>> @@ -30,23 +30,23 @@ END
> >>> chmod +x ./cl
> >>>
> >>> # Check if compile handles "-o foo", -I, -l, -L, -Xlinker -Wl,
> >>> -opts=`LIB= ./compile ./cl foo.c -o foo -lbar -Lgazonk -Ibaz -Xlinker
> >>> foobar -Wl,-foo,bar`
> >>> +opts=`LIB='' $SHELL compile ./cl foo.c -o foo -lbar -Lgazonk -Ibaz
> >>> -Xlinker foobar -Wl,-foo,bar`
> >>
> >> The LIB='' change is not mentioned under tests/compile3.test in
> >> ChangeLog. What purpose do the ticks serve anyway?
> >>
> > Nothing, this was just an unwarranted change, sorry. No point in reverting
> > it
> > now though I think, that would just add more noise.
>
> I think that a fair share of this patch should be reverted anyway,
> and in that case this might as well be reverted too.
>
Agreed.
> >> *snip*
Regards,
Stefano
From 9986bd92a59f662ea21a7e734c0556e9756eaa2b Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Sun, 5 Jun 2011 12:16:48 +0200
Subject: [PATCH] Revert "tests: use `$SHELL' to run the shell scripts from
`lib/'"
This reverts commit f977d00e0a3ab9af3555bb3bc8ea78726cb7a143.
See <http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00018.html>
for the reasons behind this revert.
---
ChangeLog | 30 ------------------------------
tests/ar-lib.test | 22 +++++++++++-----------
tests/compile.test | 6 +++---
tests/compile2.test | 4 ++--
tests/compile3.test | 10 +++++-----
tests/compile4.test | 4 ++--
tests/compile5.test | 2 +-
tests/compile6.test | 20 ++++++++++----------
tests/instsh2.test | 46 +++++++++++++++++++++++-----------------------
tests/instsh3.test | 12 +++++-------
tests/missing.test | 2 +-
tests/missing2.test | 2 +-
tests/missing3.test | 25 ++++++++-----------------
tests/missing5.test | 16 +++++++---------
tests/mkinst3.test | 8 +++-----
15 files changed, 82 insertions(+), 127 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6d8f4b8..569f44a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,36 +11,6 @@
2011-06-02 Stefano Lattarini <address@hidden>
- tests: use `$SHELL' to run the shell scripts from `lib/'
- This should offer greater testsuite coverage for those developers
- that override CONFIG_SHELL at configure time in order to test more
- shells on a single system, instead of just the default `/bin/sh'.
- This change also fixes few spurious failures in tests using the
- `xsi-shell' requirement, where inconsistencies could crop up if
- the shell probed for XSI features (which, by default, is $SHELL)
- was not the same shell later used to run the scripts using those
- features (which was hard-coded to `/bin/sh'). Such failures have
- already occurred in practice, for examples on Solaris systems
- which had also GNU Bash installed.
- * tests/ar-lib.test: Run the `ar-lib' script with `$SHELL', rather
- than directly with `./ar-lib', which would make run unconditionally
- with `/bin/sh'.
- * tests/compile.test: Likewise, but for the `compile' script.
- * tests/compile2.test: Likewise.
- * tests/compile3.test: Likewise.
- * tests/compile4.test: Likewise.
- * tests/compile5.test: Likewise.
- * tests/compile6.test: Likewise.
- * tests/instsh2.test: Likewise, but for the `install' script.
- * tests/instsh3.test: Likewise.
- * tests/mkinst3.test: Likewise, but for the `mkinstalldirs' script.
- * tests/missing.test: Likewise, but for the `missing' script.
- * tests/missing2.test: Likewise.
- * tests/missing3.test: Likewise.
- * tests/missing5.test: Likewise.
-
-2011-06-02 Stefano Lattarini <address@hidden>
-
silent-rules tests: fix spurious failures with Sun Studio C++
* tests/silentcxx.test: The C++ compiler from Sun Studio is named
`CC'. Account for this in our grepping checks on the make output.
diff --git a/tests/ar-lib.test b/tests/ar-lib.test
index 06c9c00..7168ecd 100755
--- a/tests/ar-lib.test
+++ b/tests/ar-lib.test
@@ -36,51 +36,51 @@ END
chmod +x ./lib
# Check if ar-lib can create an archive with "cr"
-opts=`$SHELL ar-lib ./lib cr foo.lib foo.obj`
+opts=`./ar-lib ./lib cr foo.lib foo.obj`
test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.obj"
# Check if ar-lib can update an existing archive with "r"
touch foo.lib
-opts=`$SHELL ar-lib ./lib r foo.lib foo.obj`
+opts=`./ar-lib ./lib r foo.lib foo.obj`
test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
# Check if ar-lib passes on @FILE with "r"
-opts=`$SHELL ar-lib ./lib r foo.lib @list`
+opts=`./ar-lib ./lib r foo.lib @list`
test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib @list"
# Check if ar-lib can delete a member from an archive with "d"
-opts=`$SHELL ar-lib ./lib d foo.lib foo.obj`
+opts=`./ar-lib ./lib d foo.lib foo.obj`
test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
# Check if ar-lib can delete members in an @FILE
echo foo.obj > foolist
-opts=`$SHELL ar-lib ./lib d foo.lib @foolist`
+opts=`./ar-lib ./lib d foo.lib @foolist`
test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
# Check if ar-lib can list archive members with "t"
-opts=`$SHELL ar-lib ./lib t foo.lib`
+opts=`./ar-lib ./lib t foo.lib`
test x"$opts" = x"lib -NOLOGO -LIST foo.lib"
# Check if ar-lib can extract archive members with "x"
touch fake.lib
-opts=`$SHELL ar-lib ./lib x fake.lib`
+opts=`./ar-lib ./lib x fake.lib`
test x"$opts" = x"lib -NOLOGO -EXTRACT:fake.obj fake.lib"
# Check if ar-lib can extract specified archive members with "x"
-opts=`$SHELL ar-lib ./lib x foo.lib foo.obj`
+opts=`./ar-lib ./lib x foo.lib foo.obj`
test x"$opts" = x"lib -NOLOGO -EXTRACT:foo.obj foo.lib"
# Check if ar-lib can extract members in an @FILE
-opts=`$SHELL ar-lib ./lib x foo.lib @foolist`
+opts=`./ar-lib ./lib x foo.lib @foolist`
test x"$opts" = x"lib -NOLOGO -EXTRACT:foo.obj foo.lib"
# Check if ar-lib passes -lib and -LTCG through to the wrappee
-opts=`$SHELL ar-lib ./lib -lib -LTCG x foo.lib foo.obj`
+opts=`./ar-lib ./lib -lib -LTCG x foo.lib foo.obj`
test x"$opts" = x"lib -lib -LTCG -NOLOGO -EXTRACT:foo.obj foo.lib"
# Check if ar-lib can extract backslashed members
touch fake2.lib
-opts=`$SHELL ar-lib ./lib x fake2.lib`
+opts=`./ar-lib ./lib x fake2.lib`
test x"$opts" = x"lib -NOLOGO -EXTRACT:dir\\fake2.obj fake2.lib"
:
diff --git a/tests/compile.test b/tests/compile.test
index 59717fb..8427bad 100755
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -22,7 +22,7 @@ cp "$top_testsrcdir/lib/compile" .
# -o 'a c' should not be stripped because 'a c' is not an object
# (it does not matter whether touch creates ./-- or not)
-$SHELL compile touch a.o -- -o 'a c' a.c
+./compile touch a.o -- -o 'a c' a.c
test -f 'a c'
test -f ./-o
test -f a.o
@@ -30,14 +30,14 @@ test -f a.c
rm -f 'a c' ./-o a.o a.c
-$SHELL compile touch a.o -- -o 'a c.o' a.c
+./compile touch a.o -- -o 'a c.o' a.c
test -f 'a c.o'
test ! -f ./-o
test ! -f a.o
test -f a.c
# Make sure `compile' works for .obj too.
-$SHELL compile touch a.obj -- -o ac.obj a.c
+./compile touch a.obj -- -o ac.obj a.c
test ! -f a.obj
test ac.obj
diff --git a/tests/compile2.test b/tests/compile2.test
index 35c3d46..a466dc4 100755
--- a/tests/compile2.test
+++ b/tests/compile2.test
@@ -57,7 +57,7 @@ amtest_lock='slist_o.d'
export amtest_source amtest_object amtest_obj amtest_lock
: > "$amtest_source"
-$SHELL compile ./mycc -c "$amtest_source" -o "$amtest_object"
+./compile ./mycc -c "$amtest_source" -o "$amtest_object"
test -f "$amtest_object"
@@ -78,7 +78,7 @@ amtest_lock='slist_o.d'
export amtest_source amtest_object amtest_obj amtest_lock
: > "$amtest_source"
-$SHELL compile ./mycc -c "$amtest_source" -o "$amtest_object"
+./compile ./mycc -c "$amtest_source" -o "$amtest_object"
test -f "$amtest_object"
:
diff --git a/tests/compile3.test b/tests/compile3.test
index 141a17a..f949d1c 100755
--- a/tests/compile3.test
+++ b/tests/compile3.test
@@ -30,23 +30,23 @@ END
chmod +x ./cl
# Check if compile handles "-o foo", -I, -l, -L, -Xlinker -Wl,
-opts=`LIB='' $SHELL compile ./cl foo.c -o foo -lbar -Lgazonk -Ibaz -Xlinker
foobar -Wl,-foo,bar`
+opts=`LIB= ./compile ./cl foo.c -o foo -lbar -Lgazonk -Ibaz -Xlinker foobar
-Wl,-foo,bar`
test x"$opts" = x"foo.c -Fefoo bar.lib -Ibaz -link -LIBPATH:gazonk foobar -foo
bar"
# Check if compile handles "-o foo.obj"
-opts=`$SHELL compile ./cl -c foo.c -o foo.obj -Ibaz`
+opts=`./compile ./cl -c foo.c -o foo.obj -Ibaz`
test x"$opts" = x"-c foo.c -Fofoo.obj -Ibaz"
# Check if compile handles "-o foo.o"
-opts=`$SHELL compile ./cl -c foo.c -o foo.o -Ibaz`
+opts=`./compile ./cl -c foo.c -o foo.o -Ibaz`
test x"$opts" = x"-c foo.c -Fofoo.o -Ibaz"
# Check if compile handles "foo.cc" as C++.
-opts=`$SHELL compile ./cl -c foo.cc -o foo.o -Ibaz`
+opts=`./compile ./cl -c foo.cc -o foo.o -Ibaz`
test x"$opts" = x"-c -Tpfoo.cc -Fofoo.o -Ibaz"
# Check if compile clears the "eat" variable properly.
-opts=`eat=1 $SHELL compile ./cl -c foo.c -o foo.obj -Ibaz`
+opts=`eat=1 ./compile ./cl -c foo.c -o foo.obj -Ibaz`
test x"$opts" = x"-c foo.c -Fofoo.obj -Ibaz"
:
diff --git a/tests/compile4.test b/tests/compile4.test
index a54a272..cf8d6cb 100755
--- a/tests/compile4.test
+++ b/tests/compile4.test
@@ -66,7 +66,7 @@ $AUTOMAKE -a
./configure
$MAKE
-$SHELL compile cl $CPPFLAGS $CFLAGS -c -o "$absmainobj" "$absmainc"
+./compile cl $CPPFLAGS $CFLAGS -c -o "$absmainobj" "$absmainc"
# cl expects archives to be named foo.lib, not libfoo.a so
# make a simple copy here if needed. This is a severe case
@@ -76,7 +76,7 @@ if test -f sub/libfoo.a; then
cp sub/libfoo.a sub/foo.lib
fi
-$SHELL compile cl $CFLAGS $LDFLAGS -L"$absfoodir" "$absmainobj" -o main -lfoo
+./compile cl $CFLAGS $LDFLAGS -L"$absfoodir" "$absmainobj" -o main -lfoo
./main
diff --git a/tests/compile5.test b/tests/compile5.test
index d2aa210..cd8baee 100755
--- a/tests/compile5.test
+++ b/tests/compile5.test
@@ -67,7 +67,7 @@ pwd=`pwd`
# Check if "compile cl" transforms absolute file names to
# host format (e.g /somewhere -> c:/msys/1.0/somewhere).
-res=`$SHELL ./compile ./cl -L"$pwd" | sed -e 's/-link -LIBPATH://'`
+res=`./compile ./cl -L"$pwd" | sed -e 's/-link -LIBPATH://'`
case $res in
?:[\\/]*)
diff --git a/tests/compile6.test b/tests/compile6.test
index fc39f10..02feb4b 100755
--- a/tests/compile6.test
+++ b/tests/compile6.test
@@ -41,42 +41,42 @@ mkdir lib
:> lib/bar.dll.lib
# Check if compile library search correctly
-opts=`$SHELL compile ./cl foo.c -o foo -Llib -lbar -lfoo`
+opts=`./compile ./cl foo.c -o foo -Llib -lbar -lfoo`
test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link
-LIBPATH:lib"
# Check if -static makes compile avoid bar.dll.lib
-opts=`$SHELL compile ./cl foo.c -o foo -Llib -static -lbar -lfoo`
+opts=`./compile ./cl foo.c -o foo -Llib -static -lbar -lfoo`
test x"$opts" = x"foo.c -Fefoo lib/bar.lib $syslib/foo.lib -link -LIBPATH:lib"
:> syslib/bar.lib
:> syslib/bar.dll.lib
# Check if compile finds bar.dll.lib in syslib
-opts=`$SHELL compile ./cl foo.c -o foo -lbar -lfoo`
+opts=`./compile ./cl foo.c -o foo -lbar -lfoo`
test x"$opts" = x"foo.c -Fefoo $syslib/bar.dll.lib $syslib/foo.lib"
# Check if compile prefers -L over $LIB
-opts=`$SHELL compile ./cl foo.c -o foo -Llib -lbar -lfoo`
+opts=`./compile ./cl foo.c -o foo -Llib -lbar -lfoo`
test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link
-LIBPATH:lib"
mkdir lib2
:> lib2/bar.dll.lib
# Check if compile avoids bar.dll.lib in lib2 when -static
-opts=`$SHELL compile ./cl foo.c -o foo -Llib2 -static -lbar -lfoo`
+opts=`./compile ./cl foo.c -o foo -Llib2 -static -lbar -lfoo`
test x"$opts" = x"foo.c -Fefoo $syslib/bar.lib $syslib/foo.lib -link
-LIBPATH:lib2"
# Check if compile gets two different bar libraries when -static
# is added in the middle
-opts=`$SHELL compile ./cl foo.c -o foo -Llib2 -Llib -lbar -static -lbar`
+opts=`./compile ./cl foo.c -o foo -Llib2 -Llib -lbar -static -lbar`
test x"$opts" = x"foo.c -Fefoo lib2/bar.dll.lib lib/bar.lib -link
-LIBPATH:lib2 -LIBPATH:lib"
# Check if compile gets the correct bar.dll.lib
-opts=`$SHELL compile ./cl foo.c -o foo -Llib -Llib2 -lbar -lfoo`
+opts=`./compile ./cl foo.c -o foo -Llib -Llib2 -lbar -lfoo`
test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link
-LIBPATH:lib -LIBPATH:lib2"
# Check if compile gets the correct bar.dll.lib
-opts=`$SHELL compile ./cl foo.c -o foo -Llib2 -Llib -lbar -lfoo`
+opts=`./compile ./cl foo.c -o foo -Llib2 -Llib -lbar -lfoo`
test x"$opts" = x"foo.c -Fefoo lib2/bar.dll.lib $syslib/foo.lib -link
-LIBPATH:lib2 -LIBPATH:lib"
mkdir "sys lib2"
@@ -87,11 +87,11 @@ LIB="$syslib2;$LIB"
# Check if compile handles spaces in $LIB and that it prefers the order
# in a multi-component $LIB.
-opts=`$SHELL compile ./cl foo.c -o foo -lfoo`
+opts=`./compile ./cl foo.c -o foo -lfoo`
test x"$opts" = x"foo.c -Fefoo $syslib2/foo.dll.lib"
# Check if compile handles the 2nd directory in a multi-component $LIB.
-opts=`$SHELL compile ./cl foo.c -o foo -static -lfoo`
+opts=`./compile ./cl foo.c -o foo -static -lfoo`
test x"$opts" = x"foo.c -Fefoo $syslib/foo.lib"
:
diff --git a/tests/instsh2.test b/tests/instsh2.test
index 294e1fa..2019b35 100755
--- a/tests/instsh2.test
+++ b/tests/instsh2.test
@@ -19,95 +19,95 @@
. ./defs || Exit 1
# Basic errors
-$SHELL install-sh && Exit 1
-$SHELL install-sh -m 644 dest && Exit 1
+./install-sh && Exit 1
+./install-sh -m 644 dest && Exit 1
# Directories
# It should be OK to create no directory. We sometimes need
# this when directory are conditionally defined.
-$SHELL install-sh -d
+./install-sh -d
# One directory.
-$SHELL install-sh -d d0
+./install-sh -d d0
test -d d0
# Multiple directories (for make installdirs).
-$SHELL install-sh -d d1 d2 d3 d4
+./install-sh -d d1 d2 d3 d4
test -d d1
test -d d2
test -d d3
test -d d4
# Subdirectories
-$SHELL install-sh -d p1/p2/p3 p4//p5//p6//
+./install-sh -d p1/p2/p3 p4//p5//p6//
test -d p1/p2/p3
test -d p4/p5/p6
# Files.
: > x
-$SHELL install-sh -c -m 644 x y
+./install-sh -c -m 644 x y
test -f x
test -f y
-$SHELL install-sh -m 644 y z
+./install-sh -m 644 y z
test -f y
test -f z
# Multiple files
-$SHELL install-sh -m 644 -c x z d1
+./install-sh -m 644 -c x z d1
test -f x
test -f z
test -f d1/x
test -f d1/z
-$SHELL install-sh -m 644 x z d2//
+./install-sh -m 644 x z d2//
test -f x
test -f z
test -f d2/x
test -f d2/z
-$SHELL install-sh -t d3 -m 644 x z
+./install-sh -t d3 -m 644 x z
test -f x
test -f z
test -f d3/x
test -f d3/z
-$SHELL install-sh -t d4// -m 644 x z
+./install-sh -t d4// -m 644 x z
test -f x
test -f z
test -f d4/x
test -f d4/z
-$SHELL install-sh -T x d3/y
+./install-sh -T x d3/y
test -f x
test -f d3/y
-$SHELL install-sh -T x d3 && Exit 1
-$SHELL install-sh -T x d4// && Exit 1
+./install-sh -T x d3 && Exit 1
+./install-sh -T x d4// && Exit 1
# Ensure that install-sh works with names that include spaces.
touch 'a b'
mkdir 'x y'
-$SHELL install-sh 'a b' 'x y'
+./install-sh 'a b' 'x y'
test -f x\ \ y/a\ \ b
test -f 'a b'
# Ensure we do not run into `test' operator precedence bugs with Tru64 sh.
for c in = '(' ')' '!'; do
- $SHELL install-sh $c 2>stderr && { cat stderr >&2; Exit 1; }
+ ./install-sh $c 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'test: ' stderr && Exit 1
# Skip tests if the file system is not capable.
mkdir ./$c || continue
rmdir ./$c
- $SHELL install-sh -d $c/$c/$c
+ ./install-sh -d $c/$c/$c
rm -rf ./$c
- $SHELL install-sh -d $c d5/$c/$c
+ ./install-sh -d $c d5/$c/$c
test -d ./$c
test -d d5/$c/$c
- $SHELL install-sh x $c
+ ./install-sh x $c
test -f ./$c/x
rm -f ./$c/x
- $SHELL install-sh -t $c x
+ ./install-sh -t $c x
test -f ./$c/x
rm -rf ./$c
( : > ./$c ) || continue
- $SHELL install-sh $c x d5/$c/$c
+ ./install-sh $c x d5/$c/$c
test -f d5/$c/$c/x
test -f d5/$c/$c/$c
rm -f d5/$c/$c/?
- $SHELL install-sh -t d5/$c/$c $c x
+ ./install-sh -t d5/$c/$c $c x
test -f d5/$c/$c/x
test -f d5/$c/$c/$c
done
diff --git a/tests/instsh3.test b/tests/instsh3.test
index 788cf1d..da50419 100755
--- a/tests/instsh3.test
+++ b/tests/instsh3.test
@@ -23,20 +23,18 @@ required=non-root
touch -t $old_timestamp foo \
|| skip_ "touch utility doesn't accept '-t' option"
-$SHELL install-sh -d d1
+./install-sh -d d1
# Do not change the timestamps when using -C.
echo foo >file
-$SHELL install-sh -C file d1
+./install-sh -C file d1
TZ=UTC0 touch -t $old_timestamp d1/file
-$SHELL install-sh -C file d1
+./install-sh -C file d1
is_newest file d1/file
echo foo1 >file
-$SHELL install-sh -C file d1
+./install-sh -C file d1
diff file d1/file
# Rights must be updated.
-$SHELL install-sh -C -m 444 file d1
+./install-sh -C -m 444 file d1
test -r d1/file
test ! -w d1/file
-
-:
diff --git a/tests/missing.test b/tests/missing.test
index 0e6d0ea..2e6d8d3 100755
--- a/tests/missing.test
+++ b/tests/missing.test
@@ -32,7 +32,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="$SHELL ./missing --run $AUTOCONF"
+MYAUTOCONF="./missing --run $AUTOCONF"
unset AUTOCONF
./configure AUTOCONF="$MYAUTOCONF"
diff --git a/tests/missing2.test b/tests/missing2.test
index 304c3a6..88e6b27 100755
--- a/tests/missing2.test
+++ b/tests/missing2.test
@@ -33,7 +33,7 @@ $AUTOCONF
$AUTOMAKE --add-missing
# See missing.test for explanations about this.
-MYAUTOCONF="$SHELL missing --run $AUTOCONF"
+MYAUTOCONF="./missing --run $AUTOCONF"
unset AUTOCONF
./configure AUTOCONF="$MYAUTOCONF"
diff --git a/tests/missing3.test b/tests/missing3.test
index f0b6907..21b5e4f 100755
--- a/tests/missing3.test
+++ b/tests/missing3.test
@@ -20,40 +20,31 @@
# b7cb8259 assumed not to exist.
-$SHELL missing b7cb8259 --version 2>stderr \
- && { cat stderr >&2; Exit 1; }
+./missing b7cb8259 --version 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep . stderr && Exit 1
-$SHELL missing b7cb8259 --grep 2>stderr \
- && { cat stderr >&2; Exit 1; }
+./missing b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep WARNING stderr
-$SHELL missing --run b7cb8259 --version && Exit 1
-$SHELL missing --run b7cb8259 --grep 2>stderr \
- && { cat stderr >&2; Exit 1; }
+./missing --run b7cb8259 --version && Exit 1
+./missing --run b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep WARNING stderr
# missing itself it known to exist :)
-$SHELL missing ./missing --version 2>stderr \
- && { cat stderr >&2; Exit 1; }
+./missing ./missing --version 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep . stderr && Exit 1
-$SHELL missing ./missing --grep 2>stderr \
- && { cat stderr >&2; Exit 1; }
+./missing ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep WARNING stderr
-$SHELL missing --run ./missing --version 2>stderr \
- || { cat stderr >&2; Exit 1; }
+./missing --run ./missing --version 2>stderr || { cat stderr >&2; Exit 1; }
cat stderr >&2
grep . stderr && Exit 1
-$SHELL missing --run ./missing --grep 2>stderr \
- && { cat stderr >&2; Exit 1; }
+./missing --run ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep WARNING stderr && Exit 1
grep Unknown stderr
-
-:
diff --git a/tests/missing5.test b/tests/missing5.test
index 91e5857..010b344 100755
--- a/tests/missing5.test
+++ b/tests/missing5.test
@@ -33,9 +33,9 @@ AC_OUTPUT
EOF
for tool in $needed_tools; do
- unindent >$tool.in <<EOF
- #! /bin/sh
- exec @$tool@ "\$@"
+ cat >$tool.in <<EOF
+#! /bin/sh
+exec @$tool@ "\$@"
EOF
done
@@ -48,16 +48,14 @@ cp output-file my--output--file-o
save_PATH=$PATH
PATH=.
export PATH
-$SHELL missing --help
-$SHELL missing --version
+missing --help
+missing --version
for tool in autom4te help2man makeinfo; do
- $SHELL missing --run $tool -o my--output--file-o input
- $SHELL missing --run $tool --output my--output--file-o input
+ missing --run $tool -o my--output--file-o input
+ missing --run $tool --output my--output--file-o input
done
PATH=$save_PATH
export PATH
diff output-file my--output--file-o
test ! -f ./--file-o
test ! -f input
-
-:
diff --git a/tests/mkinst3.test b/tests/mkinst3.test
index d24f5ae..0082b53 100755
--- a/tests/mkinst3.test
+++ b/tests/mkinst3.test
@@ -27,7 +27,7 @@ cp "$top_testsrcdir/lib/mkinstalldirs" .
# Test mkinstalldirs with the installed mkdir.
-$SHELL mkinstalldirs '~a b/-x y'
+./mkinstalldirs '~a b/-x y'
test -d '~a b/-x y'
rm -rf '~a b'
@@ -55,12 +55,10 @@ export PATH
# Test mkinstalldirs without mkdir -p.
-$SHELL mkinstalldirs '~a b/-x y'
+./mkinstalldirs '~a b/-x y'
test -d '~a b/-x y'
rm -rf '~a b'
-$SHELL mkinstalldirs "`pwd`///~a b//-x y"
+./mkinstalldirs "`pwd`///~a b//-x y"
test -d "`pwd`/~a b/-x y"
rm -rf '~a b'
-
-:
--
1.7.2.3