* lib/am/parallel-tests.am (am.test-suite.handle-suffix.helper): New, extracted from ... (am.test-suite.handle-suffix): ... this, which now uses it. (am__tpfx): Remove, inlined into 'am.test-suite.handle-suffix'.
Signed-off-by: Stefano Lattarini <[email protected]> --- lib/am/parallel-tests.am | 26 +++++++++++-------------- t/parallel-tests-internals.sh | 44 ------------------------------------------- 2 files changed, 11 insertions(+), 59 deletions(-) delete mode 100755 t/parallel-tests-internals.sh diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am index 6c56f85..defd88b 100644 --- a/lib/am/parallel-tests.am +++ b/lib/am/parallel-tests.am @@ -60,27 +60,23 @@ am.test-suite.runtest = \ "$$tst" \ $(AM_TESTS_FD_REDIRECT) -# Turn e.g., ".test" in "_TEST", and return the empty string unchanged. -am__tpfx = \ - $(if $1,$(call am.util.toupper,$(patsubst .%,%_,$1))) - -define am.test-suite.handle-suffix - -ifeq ($$(call am.vars.is-undef,$$(call am__tpfx,$1)LOG_DRIVER),yes) -$$(call am__tpfx,$1)LOG_DRIVER = $(SHELL) $(am.conf.aux-dir)/test-driver +define am.test-suite.handle-suffix.helper +ifeq ($$(call am.vars.is-undef,$(2)LOG_DRIVER),yes) +$(2)LOG_DRIVER = $(SHELL) $(am.conf.aux-dir)/test-driver endif - -%.log %.trs: %$1 $$($$(call am__tpfx,$1)LOG_DEPENDENCIES) - @$$(call am.test-suite.runtest,$$(call am__tpfx,$1)) - +%.log %.trs: %$1 $$($(2)LOG_DEPENDENCIES) + @$$(call am.test-suite.runtest,$2) ifeq ($(am.conf.handle-exeext),yes) ifdef EXEEXT -%.log %.trs: %$1$(EXEEXT) $$($$(call am__tpfx,$1)LOG_DEPENDENCIES) - @$$(call am.test-suite.runtest,$$(call am__tpfx,$1)) +%.log %.trs: %$1$(EXEEXT) $$($(2)LOG_DEPENDENCIES) + @$$(call am.test-suite.runtest,$2) endif # defined EXEEXT endif # am.conf.handle-exeext = yes +endef -endef # am.test-suite.handle-suffix +define am.test-suite.handle-suffix +$(call $0.helper,$1,$(if $1,$(call am.util.toupper,$(patsubst .%,%_,$1)))) +endef ifeq ($(call am.vars.is-undef,TEST_EXTENSIONS),yes) TEST_EXTENSIONS := .test diff --git a/t/parallel-tests-internals.sh b/t/parallel-tests-internals.sh deleted file mode 100755 index f15852f..0000000 --- a/t/parallel-tests-internals.sh +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/sh -# Copyright (C) 2009-2012 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# Some internals of the parallel testsuite harness implementation. - -. ./defs || exit 1 - -cat >> configure.ac << 'END' -AC_OUTPUT -END - -cat > Makefile.am << 'END' -TESTS = -.PHONY: test -test: - test x'$(call am__tpfx,)' = x - test x'$(call am__tpfx,.test)' = x'TEST_' - test x'$(call am__tpfx,.sh5)' = x'SH5_' - test x'$(call am__tpfx,.x_y)' = x'X_Y_' - test x'$(call am__tpfx, )' = x - test x'$(call am__tpfx, .t )' = x'T_' -END - -$ACLOCAL -$AUTOCONF -$AUTOMAKE -a - -./configure -$MAKE test - -: -- 1.7.12.rc0
