summaryrefslogtreecommitdiff
path: root/tests/output.at
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-10-12 12:34:10 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-10-13 09:22:05 +0200
commitc483b6593fba38b4b1637e946f496eb0c8edfdb2 (patch)
treeb2f38edffb23278e6a198c58d16c9515a48456f5 /tests/output.at
parent59cb1f421cfa273b8d638d099981714371e3b191 (diff)
downloadbison-c483b6593fba38b4b1637e946f496eb0c8edfdb2.tar.gz
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.
Diffstat (limited to 'tests/output.at')
-rw-r--r--tests/output.at8
1 files changed, 4 insertions, 4 deletions
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