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)
$output_rules .= file_contents ('dejagnu', new Automake::Location);
}
-# is_valid_test_extension ($EXT)
-# ------------------------------
-# Return true if $EXT can appear in $(TEST_EXTENSIONS), return false
-# otherwise.
-sub is_valid_test_extension ($)
-{
- my $ext = shift;
- return 1
- if ($ext =~ /^\./);
- return 1
- if (exists $configure_vars{'EXEEXT'} && $ext eq subst ('EXEEXT'));
- return 0;
-}
-
# Handle TESTS variable and other checks.
sub handle_tests
{
msg_var 'unsupported', $var,
"'TEST_EXTENSIONS' cannot have conditional contents";
}
- my @test_suffixes = $var->value_as_list_recursive;
- my @invalid_test_suffixes = grep { !is_valid_test_extension $_ }
- @test_suffixes;
- @test_suffixes = grep { is_valid_test_extension $_ } @test_suffixes;
$output_rules .=
file_contents ('parallel-tests', new Automake::Location,
COLOR => !! option 'color-tests',
- CHECK_DEPS => "@check",
- INVALID_TEST_EXTENSIONS => "@invalid_test_suffixes");
+ CHECK_DEPS => "@check");
$clean_files{'$(am__test_logs)'} = MOSTLY_CLEAN;
$clean_files{'$(am__test_results)'} = MOSTLY_CLEAN;
$clean_files{'$(TEST_SUITE_LOG)'} = MOSTLY_CLEAN;
## of more test metadata, and the use of custom test derivers and protocols
## (among them, TAP).
-am__invalid_test_extensions = %INVALID_TEST_EXTENSIONS%
-$(if $(am__invalid_test_extensions), \
- $(foreach am__e, $(am__invalid_test_extensions), \
- $(warning invalid test extension: '$(am__e)')) \
- $(error invalid test extensions have been encountered))
+am__maybe_invalid_test_extensions = \
+ $(if \
+ $(strip $1), \
+ $(foreach am__e, $1,\
+ $(warning invalid test extension: '$(am__e)')) \
+ $(error invalid test extensions have been encountered))
am__is_xfail_test = \
$(if $(filter-out $(am__xfail_test_bases), \
!endif # am__handle_exeext = yes
!endef
!
+!$(call am__maybe_invalid_test_extensions,$(filter-out .%,$(TEST_EXTENSIONS)))
## FIXME: it would be nice to break these on multiple lines. Unfortnately,
## FIXME: our '!' is not yet smart enough to handle that :-(
!$(foreach am__e,$(TEST_EXTENSIONS), $(eval $(call am__handle_per_suffix_test,$(am__e))))
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2011-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/>.
+
+# Make sure that invalid entries in TEST_EXTENSIONS are diagnosed at
+# make runtime. See automake bug#9400.
+
+. ./defs || Exit 1
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am << 'END'
+TESTS =
+TEST_EXTENSIONS = mu x1 .foo _ x2
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+for suf in mu x1 _ x2; do
+ $FGREP "invalid test extension: '$suf'" stderr
+done
+
+# Verify that we don't report valid suffixes, even if intermixed
+# with invalid ones.
+grep 'invalid.*extension.*foo' stderr && Exit 1
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2011-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/>.
-
-# Make sure that Automake diagnose invalid entries in TEST_EXTENSIONS,
-# and do not diagnose valid (albeit more unusual) ones.
-# See automake bug#9400.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AC_OUTPUT
-END
-
-$ACLOCAL
-$AUTOCONF
-
-valid_extensions='sh T t1 _foo BAR x_Y_z _'
-
-echo TESTS = > Makefile.am
-echo " $valid_extensions" \
- | sed -e 's/ / ./g' -e 's/^/TEST_EXTENSIONS =/' >> Makefile.am
-cat Makefile.am # For debugging.
-
-$AUTOMAKE -a
-
-grep -i 'log' Makefile.in # For debugging.
-
-for lc in $valid_extensions; do
- uc=`echo $lc | tr '[a-z]' '[A-Z]'`
- grep "^${uc}_LOG_DRIVER =" Makefile.in
- grep "^%\.log %\.trs *:.*%\.${lc}" Makefile.in
-done
-
-# The produced Makefile is not broken.
-./configure
-$MAKE all check
-$MAKE distclean
-
-cat > Makefile.am << 'END'
-TESTS = foo.test bar.sh
-TEST_EXTENSIONS = .test mu .x-y a-b .t.1 .sh .6c .0 .11
-TEST_EXTENSIONS += .= .t33 .a@b _&_
-END
-
-$AUTOMAKE
-./configure
-
-$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-for suf in mu .x-y a-b .t.1 .6c .0 .11 '.=' '_&_'; do
- $FGREP "invalid test extension: '$suf'" stderr
-done
-
-# Verify that we accept valid suffixes, even if intermixed with
-# invalid ones.
-$EGREP 'invalid.*\.(sh|test|t33)' stderr && Exit 1
-
-: