mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-26 15:03:22 +00:00
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.
This commit is contained in:
parent
7508234eab
commit
366adeb73d
@ -22,21 +22,6 @@ TESTS_ENVIRONMENT = \
|
||||
tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.; \
|
||||
TMPDIR=$$tmp__; export TMPDIR; \
|
||||
exec 9>&2; \
|
||||
shell_or_perl_() { \
|
||||
if grep '^\#!/usr/bin/perl' "$$1" > /dev/null; then \
|
||||
if $(PERL) -e 'use warnings' > /dev/null 2>&1; then \
|
||||
grep '^\#!/usr/bin/perl -T' "$$1" > /dev/null && T_=T || T_=; \
|
||||
$(PERL) -w$$T_ -I$(srcdir) -MCoreutils \
|
||||
-M"CuTmpdir qw($$f)" -- "$$1"; \
|
||||
else \
|
||||
echo 1>&2 "$$tst: configure did not find a usable version of Perl," \
|
||||
"so skipping this test"; \
|
||||
(exit 77); \
|
||||
fi; \
|
||||
else \
|
||||
$(SHELL) "$$1"; \
|
||||
fi; \
|
||||
}; \
|
||||
export \
|
||||
VERSION='$(VERSION)' \
|
||||
abs_top_builddir='$(abs_top_builddir)' \
|
||||
@ -55,7 +40,9 @@ TESTS_ENVIRONMENT = \
|
||||
PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
|
||||
REPLACE_GETCWD=$(REPLACE_GETCWD) \
|
||||
PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
|
||||
; shell_or_perl_
|
||||
;
|
||||
|
||||
LOG_COMPILER= $(SHELL)
|
||||
|
||||
built_programs = \
|
||||
echo 'spy:;@echo $$(PROGRAMS)' \
|
||||
|
||||
0
tests/binary
Normal file → Executable file
0
tests/binary
Normal file → Executable file
0
tests/colliding-file-names
Normal file → Executable file
0
tests/colliding-file-names
Normal file → Executable file
0
tests/excess-slash
Normal file → Executable file
0
tests/excess-slash
Normal file → Executable file
0
tests/no-newline-at-eof
Normal file → Executable file
0
tests/no-newline-at-eof
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user