diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2011-10-11 01:11:08 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-10-15 10:15:00 +0200 |
commit | 4c901abefb0b6e39d8d4b74df72f77afa7e8bb58 (patch) | |
tree | bc50fc656e227ca327eb1997482219ad7fb20783 /tests/Makefile.am | |
parent | c774ea6bf4f3112c2a5c5d8458310697d21ddcf8 (diff) | |
download | parted-4c901abefb0b6e39d8d4b74df72f77afa7e8bb58.tar.gz |
tests: TEST_ENVIRONMENT simplified and made more robust
The test scripts in tests/ 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 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/help-version: Moved ...
* tests/help-version.sh: ... to this.
* tests/Makefile.am (TESTS): Update.
(TESTS_ENVIRONMENT): Remove definition of the `shell_or_perl_' shell
function, which is not required anymore.
(SH_LOG_COMPILER): New, define to `$(SHELL)'.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 903ca64..f7a170d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,8 +1,11 @@ XFAIL_TESTS = \ t3200-type-change.sh +TEST_EXTENSIONS = .sh +SH_LOG_COMPILER = $(SHELL) + TESTS = \ - help-version \ + help-version.sh \ t0000-basic.sh \ t0001-tiny.sh \ t0010-script-no-ctrl-chars.sh \ @@ -78,21 +81,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 \ abs_top_builddir='$(abs_top_builddir)' \ abs_top_srcdir='$(abs_top_srcdir)' \ @@ -112,6 +100,6 @@ TESTS_ENVIRONMENT = \ REPLACE_GETCWD=$(REPLACE_GETCWD) \ PATH='$(abs_top_builddir)/parted$(PATH_SEPARATOR)'"$$PATH" \ VERSION=$(VERSION) \ - ; shell_or_perl_ + ; VERBOSE = yes |