[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-diffutils] [PATCH] tests: make test runner a script, not a shel
Re: [bug-diffutils] [PATCH] tests: make test runner a script, not a shell function
Wed, 12 Oct 2011 19:42:46 +0200
KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; )
On Wednesday 12 October 2011, Jim Meyering wrote:
> Stefano Lattarini wrote:
> > Oops, the patch wasn't exactly right, as it introduced a slight semantic
> > change by making the test scripts being executed by the system default
> > shell `/bin/sh' rather than by the shell `$(SHELL)' detected at configure
> > time. On some systems (e.g., Solaris 10), the difference is quite
> > relevant, since /bin/sh might not be a POSIX-conforming shell. So the
> > following diff should be squashed in:
> > diff --git a/tests/Makefile.am b/tests/Makefile.am
> > index 5e2944d..9835ab6 100644
> > --- a/tests/Makefile.am
> > +++ b/tests/Makefile.am
> > @@ -42,6 +42,8 @@ TESTS_ENVIRONMENT = \
> > PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
> > ;
> > +LOG_COMPILER= $(SHELL)
> > +
> > built_programs = \
> > echo 'spy:;@echo $$(PROGRAMS)' \
> > | MAKEFLAGS= $(MAKE) -s -C $(builddir)/../src -f Makefile -f - spy \
> > Attached is an updated patch that fixes the issue.
> > Sorry for the noise,
> > Stefano
> > From 5a45c31552df3b32810c92cf3502d8d1d6bfe9ce Mon Sep 17 00:00:00 2001
> > Message-Id: <address@hidden>
> > From: Stefano Lattarini <address@hidden>
> > Date: Mon, 10 Oct 2011 20:30:21 +0200
> > Subject: [PATCH] tests: make test runner a script, not a shell function
> > All the test scripts in the diffutils testsuite are shell scripts,
> > so the current definition of TESTS_ENVIRONMENT, which adaptively
> > run tests using either perl or the shell depending on their kind,
> > is an overkill.
> > Moreover, this change is required in order for the testsuite to
> > continue to work with the new testsuite harness that is planned
> > to be introduced in Automake 1.12 (which, as of the writing date,
> > is still under development and in late alpha state).
> > See also related discussion on bug-coreutils:
> > <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8887>
> > * tests/Makefile.am (TESTS_ENVIRONMENT): Remove definition of the
> > `shell_or_perl_' shell function, which is not required anymore.
> > (LOG_COMPILER): New, define to `$(SHELL)'.
> > * tests/binary: Make executable.
> > * tests/colliding-file-names: Likewise.
> > * tests/excess-slash: Likewise.
> > * tests/no-newline-at-eof: Likewise.
> Thanks. I've applied it and expect to push soon.
Hello Jim . Hoping it's not too late, I thin k it would be better to
amend the first line of the commit message to read someting like
"tests: TEST_ENVIRONMENT simplified and made more robust", or similar;
the current wording ("tests: make test runner a script, not a shell
function") is a bit misleading IMHO.
Thanks, and sorry for the noise,