dist_am_DATA = \
lib/am/serial-tests.am \
lib/am/parallel-tests.am \
- lib/am/check2.am \
lib/am/color-tests.am \
lib/am/clean-hdr.am \
lib/am/clean.am \
t/pr8365-remake-timing.sh \
t/remake-am-pr10111.sh \
t/remake-m4-pr10111.sh \
+ t/test-extensions.sh \
t/txinfo5.sh \
$(perl_fake_XFAIL_TESTS)
# ``variable 'LOG_DEPENDENCIES' is defined but no program or
# library has 'LOG' as canonical name (possible typo)''
set_seen ("${pfx}LOG_DEPENDENCIES");
- $output_rules .= file_contents ('check2', new Automake::Location,
- PFX => $pfx,
- EXT => $test_suffix);
}
# is_valid_test_extension ($EXT)
+++ /dev/null
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2008-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/>.
-
-if %?FIRST%
-
-am__is_xfail_test = \
- $(if $(filter-out $(am__xfail_test_bases), \
- $(patsubst $(srcdir)/%,%,$(1))),no,yes)
-am__runtest = \
- $(am__sh_e_setup); \
- $(am__tty_colors); \
- srcdir=$(srcdir); export srcdir; \
-## Creates the directory for the log if needed.
- test x$(@D) = x. || test -d $(@D) || $(MKDIR_P) $(@D) || exit $$?; \
-## We need to invoke the test in way that won't cause a PATH search.
-## Quotes around '$<' are required to avoid extra errors when a circular
-## dependency is detected (e.g., because $(TEST_SUITE_LOG) is in
-## $(am__test_logs)), because in that case '$<' expands to empty and an
-## unquote usage of it could cause syntax errors in the shell.
- case '$<' in */*) tst='$<';; *) tst=./'$<';; esac; \
-## Executes the developer-defined and user-defined test
-## setups (if any), in that order.
- $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) \
- $($(1)LOG_DRIVER) \
- --test-name '$(patsubst $(srcdir)/%,%,$<)' \
- --log-file $*.log \
- --trs-file $*.trs \
- --color-tests "$$am__color_tests" \
- --enable-hard-errors $(if $(DISABLE_HARD_ERRORS),no,yes) \
- --expect-failure $(call am__is_xfail_test,$*) \
- $(AM_$(1)LOG_DRIVER_FLAGS) \
- $($(1)LOG_DRIVER_FLAGS) \
- -- \
- $($(1)LOG_COMPILER) \
- $(AM_$(1)LOG_FLAGS) \
- $($(1)LOG_FLAGS) \
- "$$tst" \
- $(AM_TESTS_FD_REDIRECT)
-
-endif %?FIRST%
-
-## From a test file to a .log and .trs file.
-%.log %.trs: %%EXT% $(%PFX%LOG_DEPENDENCIES)
- @$(call am__runtest,%PFX%)
-
-## If no programs are built in this package, then this rule is removed
-## at automake time.
-if %HANDLE-EXEEXT%
-## FIXME: spurious indentnation to avoid Automake thinking this is an
-## automake conditional.
- ifdef EXEEXT
-%.log %.trs: %%EXT%$(EXEEXT) $(%PFX%LOG_DEPENDENCIES)
- @$(call am__runtest,%PFX%)
- endif
-endif %HANDLE-EXEEXT%
$(warning invalid test extension: '$(am__e)')) \
$(error invalid test extensions have been encountered))
+am__is_xfail_test = \
+ $(if $(filter-out $(am__xfail_test_bases), \
+ $(patsubst $(srcdir)/%,%,$(1))),no,yes)
+am__runtest = \
+ $(am__sh_e_setup); \
+ $(am__tty_colors); \
+ srcdir=$(srcdir); export srcdir; \
+## Creates the directory for the log file if needed. Avoid extra forks.
+ test x$(@D) = x. || test -d $(@D) || $(MKDIR_P) $(@D) || exit $$?; \
+## We need to invoke the test in way that won't cause a PATH search.
+## Quotes around '$<' are required to avoid extra errors when a circular
+## dependency is detected (e.g., because $(TEST_SUITE_LOG) is in
+## $(am__test_logs)), because in that case '$<' expands to empty and an
+## unquote usage of it could cause syntax errors in the shell.
+ case '$<' in */*) tst='$<';; *) tst=./'$<';; esac; \
+## Executes the developer-defined and user-defined test
+## setups (if any), in that order.
+ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) \
+ $($(1)LOG_DRIVER) \
+ --test-name '$(patsubst $(srcdir)/%,%,$<)' \
+ --log-file $*.log \
+ --trs-file $*.trs \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors $(if $(DISABLE_HARD_ERRORS),no,yes) \
+ --expect-failure $(call am__is_xfail_test,$*) \
+ $(AM_$(1)LOG_DRIVER_FLAGS) \
+ $($(1)LOG_DRIVER_FLAGS) \
+ -- \
+ $($(1)LOG_COMPILER) \
+ $(AM_$(1)LOG_FLAGS) \
+ $($(1)LOG_FLAGS) \
+ "$$tst" \
+ $(AM_TESTS_FD_REDIRECT)
+
+## Turn e.g., ".test" in "_TEST", and return the empty string unchanged.
+am__tpfx = \
+ $(if $1,$(call am__toupper,$(patsubst .%,%_,$1)))
+
+!define am__handle_per_suffix_test
+!%.log %.trs: %$1 $$($$(call am__tpfx,$1)LOG_DEPENDENCIES)
+! @$$(call am__runtest,$$(call am__tpfx,$1))
+!ifeq ($(am__handle_exeext),yes)
+!ifdef EXEEXT
+!%.log %.trs: %$1$(EXEEXT) $$($$(call am__tpfx,$1)LOG_DEPENDENCIES)
+! @$$(call am__runtest,$$(call am__tpfx,$1))
+!endif # defined EXEEXT
+!endif # am__handle_exeext = yes
+!endef
+!
+!$(foreach am__e,$(TEST_EXTENSIONS), $(eval $(call am__handle_per_suffix_test,$(am__e))))
+## It is *imperative* that the "empty" suffix goes last. Otherwise, a
+## declaration like "TESTS = all.test" would cause GNU make to mistakenly
+## try to build the 'all.log' and 'all.trs' files from a non-existent
+## 'all' program (because the Makefile contains an explicit 'all' target,
+## albeith .PHONY), rather than from the 'all.test' script, thus causing
+## all sort of mishaps and confusion.
+!$(eval $(call am__handle_per_suffix_test))
+
# The names of the given tests scripts with any possible registered
# test extension removed, as well as any leading '$(srcdir)' component
# (if any) stripped.
--- /dev/null
+#! /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
+
+:
$EGREP '(^| )check-TESTS.*:' $1
$EGREP '(^| )recheck.*:' $1
$EGREP '^\$\(TEST_SUITE_LOG\):.* \$\(am__test_logs\)( |$)' $1
- grep '^%.log %.trs *:.*%\.test' $1
+ grep '%\.log %\.trs *:' $1
}
mkdir one two