diffutils/tests/Makefile.am
Stefano Lattarini 366adeb73d 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.
2011-10-11 16:40:12 +02:00

53 lines
1.5 KiB
Makefile

# tests for GNU diff
TESTS = \
basic \
binary \
colliding-file-names \
excess-slash \
help-version \
function-line-vs-leading-space \
label-vs-func \
no-newline-at-eof \
stdin
EXTRA_DIST = \
$(TESTS) init.sh t-local.sh
# Note that the first lines are statements. They ensure that environment
# variables that can perturb tests are unset or set to expected values.
# The rest are envvar settings that propagate build-related Makefile
# variables to test scripts.
TESTS_ENVIRONMENT = \
tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.; \
TMPDIR=$$tmp__; export TMPDIR; \
exec 9>&2; \
export \
VERSION='$(VERSION)' \
abs_top_builddir='$(abs_top_builddir)' \
abs_top_srcdir='$(abs_top_srcdir)' \
abs_srcdir='$(abs_srcdir)' \
built_programs="`$(built_programs)`" \
srcdir='$(srcdir)' \
top_srcdir='$(top_srcdir)' \
CC='$(CC)' \
MAKE=$(MAKE) \
PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)' \
PACKAGE_VERSION=$(PACKAGE_VERSION) \
CONFIG_HEADER='$(abs_top_builddir)/lib/config.h' \
ENABLE_DEVICE_MAPPER=$(ENABLE_DEVICE_MAPPER) \
PERL='$(PERL)' \
PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
REPLACE_GETCWD=$(REPLACE_GETCWD) \
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 \
| fmt -1 | sed 's,$(EXEEXT)$$,,' | sort -u
VERBOSE = yes