mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 01:33:03 +00:00
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.
This commit is contained in:
@@ -27,7 +27,7 @@ m4_define([AT_INCREASE_DATA_SIZE],
|
||||
case $data_limit in
|
||||
[[0-9]]*)
|
||||
if test "$data_limit" -lt $1; then
|
||||
AT_CHECK([ulimit -S -d $1 || exit 77])
|
||||
AT_REQUIRE([ulimit -S -d $1])
|
||||
ulimit -S -d $1
|
||||
fi
|
||||
esac])
|
||||
@@ -120,7 +120,7 @@ EOF
|
||||
]])
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
|
||||
AT_CHECK(["$PERL" -w ./gengram.pl $2 || exit 77], 0, [stdout])
|
||||
AT_PERL_REQUIRE([-w ./gengram.pl $2], 0, [stdout])
|
||||
mv stdout $1
|
||||
])
|
||||
|
||||
@@ -203,7 +203,7 @@ yylex (void)
|
||||
EOF
|
||||
]])
|
||||
|
||||
AT_CHECK(["$PERL" -w ./gengram.pl $2 || exit 77], 0, [stdout])
|
||||
AT_PERL_REQUIRE([-w ./gengram.pl $2], 0, [stdout])
|
||||
mv stdout $1
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
])
|
||||
@@ -255,7 +255,7 @@ m4_pushdef([AT_TEST],
|
||||
|
||||
AT_BISON_OPTION_PUSHDEFS
|
||||
|
||||
AT_CHECK([ruby $abs_top_srcdir/tests/linear $1 >input.y || { echo "ruby does not work"; exit 77; }])
|
||||
AT_REQUIRE([ruby $abs_top_srcdir/tests/linear $1 >input.y])
|
||||
# Old versions of GCC reject large values given to #line.
|
||||
AT_FULL_COMPILE([input], [], [], [], [--no-line])
|
||||
AT_CHECK([grep 'define YYNSTATES *$1' input.c], [], [ignore])
|
||||
@@ -375,7 +375,7 @@ yylex (void)
|
||||
EOF
|
||||
]])
|
||||
|
||||
AT_CHECK(["$PERL" -w ./gengram.pl $2 || exit 77], 0, [stdout])
|
||||
AT_PERL_REQUIRE([-w ./gengram.pl $2], 0, [stdout])
|
||||
mv stdout $1
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user