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:
Akim Demaille
2019-10-12 12:34:10 +02:00
parent 59cb1f421c
commit c483b6593f
13 changed files with 65 additions and 39 deletions

View File

@@ -162,7 +162,7 @@ void foo (void)
]])
_AT_SYNCLINES_COMPILE([syncline.c])
AT_CHECK([[test "`cat stdout`" = 'syncline.c:4: @%:@error "4"' || exit 77]])
AT_REQUIRE([[test "`cat stdout`" = 'syncline.c:4: @%:@error "4"']])
# Then work for real.
_AT_SYNCLINES_COMPILE([$1])
@@ -409,8 +409,8 @@ AT_DATA([\"\\\"\".AT_LANG_EXT],
[[int main (void) { return 0; }
]])
AT_CHECK([AT_CXX_IF([$CXX $CXXFLAGS], [$CC $CFLAGS]) $CPPFLAGS \"\\\"\".]AT_LANG_EXT[ -o \"\\\"\" ||
exit 77], [0], [ignore], [ignore])
AT_REQUIRE([AT_CXX_IF([$CXX $CXXFLAGS], [$CC $CFLAGS]) $CPPFLAGS \"\\\"\".]AT_LANG_EXT[ -o \"\\\"\"],
[0], [ignore], [ignore])
AT_DATA_GRAMMAR([\"\\\"\".y],
[[%skeleton "$1"