"'TEST_EXTENSIONS' cannot have conditional contents";
}
my @test_suffixes = $var->value_as_list_recursive;
- if ((my @invalid_test_suffixes =
- grep { !is_valid_test_extension $_ } @test_suffixes) > 0)
- {
- error $var->rdef (TRUE)->location,
- "invalid test extensions: @invalid_test_suffixes";
- }
+ 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");
+ CHECK_DEPS => "@check",
+ INVALID_TEST_EXTENSIONS => "@invalid_test_suffixes");
# 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
## 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))
+
# The names of the given tests scripts with any possible registered
# test extension removed, as well as any leading '$(srcdir)' component
# (if any) stripped.
am__cooked_tests = $(call am__check_cook_with_exeext, $(TESTS))
am__cooked_xfail_tests = $(call am__check_cook_with_exeext, $(XFAIL_TESTS))
+.PHONY: check-TESTS
check-TESTS: $(am__cooked_tests)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
srcdir=$(srcdir); export srcdir; \
# 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 .= @suf@ .@ext@
+TEST_EXTENSIONS = .test mu .x-y a-b .t.1 .sh .6c .0 .11
TEST_EXTENSIONS += .= .t33 .a@b _&_
END
-AUTOMAKE_fails
-for suf in mu .x-y a-b .t.1 .6c .0 .11 @suf@ .@ext@ '.=' '_&_'; do
- suf2=`printf '%s\n' "$suf" | sed -e 's/\./\\./'`
- $EGREP "^Makefile\.am:2:.*invalid test extension.* $suf2( |$)" stderr
+$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 '\.(sh|test|t33)' stderr && Exit 1
-
-# Verify that we don't try to handle invalid suffixes.
-$EGREP '(LOG_COMPILER|non-POSIX var|bad character)' stderr && Exit 1
+$EGREP 'invalid.*\.(sh|test|t33)' stderr && Exit 1
: