From c483b6593fba38b4b1637e946f496eb0c8edfdb2 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 12 Oct 2019 12:34:10 +0200 Subject: tests: refactor the handling of Perl Let's make a difference between places where Perl is required for the test (AT_PERL_REQUIRE), and the places where it's used to run the test, but it's not not to run the test (AT_PERL_CHECK). * tests/local.at (AT_REQUIRE): New. (AT_PERL_CHECK, AT_PERL_REQUIRE): New. Use them where appropriate. * tests/local.mk ($(TESTSUITE)): Beware not to start the line with '-pi' if Perl is empty, as Make understands this as "it's ok to fail". Which it is not. --- tests/output.at | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/output.at') diff --git a/tests/output.at b/tests/output.at index 5f0ca876..54214eaa 100644 --- a/tests/output.at +++ b/tests/output.at @@ -22,11 +22,11 @@ AT_BANNER([[Output file names.]]) # ----------------------------------------------- # Check that the current directory contains FILE... (sorted). m4_define([AT_CHECK_FILES], -[AT_CHECK([[find . -type f | +[AT_REQUIRE([[find . -type f | "$PERL" -ne ' s,\./,,; chomp; push @file, $_ unless m{^($2|testsuite.log)$}; - END { print join (" ", sort @file), "\n" }' || exit 77]], + END { print join (" ", sort @file), "\n" }']], [], [$1 ])]) @@ -48,7 +48,7 @@ foo: '0' {}; ]]) # There is not AT_DATA_UNQUOTED. -AT_CHECK(["$PERL" -pi -e 's{\$at_dir}'"{$at_group_dir}g" $1 || exit 77]) +AT_PERL_REQUIRE([-pi -e 's{\$at_dir}'"{$at_group_dir}g" $1]) AT_BISON_CHECK([$3 $1], [$5], [], [ignore])[ @@ -257,7 +257,7 @@ m4_define([AT_CHECK_OUTPUT_FILE_NAME], AT_BISON_OPTION_PUSHDEFS # Skip if platform doesn't support file name. For example, Cygwin # doesn't support file names containing ":" or "\". -AT_CHECK([[touch "]AS_ESCAPE([$1[.tmp]])[" || exit 77]]) +AT_REQUIRE([[touch "]AS_ESCAPE([$1[.tmp]])["]]) AT_DATA_GRAMMAR([glr.y], [[%glr-parser -- cgit v1.2.1