On 2/6/25 17:42, Karl Berry wrote:
Unsetting it in the shell test driver could work,Yep. That's what I had in mind, sorry I wasn't clear. to the line that actually executes the Perl script The t/parallel-tests-log-compiler-example.sh test (copied below) is testing Automake tests, so the script is not invoked directly, but by Automake's oh-so-complicated test infrastructure. So I just unset PERL5OPT in that .sh script. Admittedly that means Perl warnings won't be fatal elsehere in the test invocation, but IMHO we can live with that. I could have unset PERL5OPT a few line farther down, but I thought it was clearest to put the warning stuff together.
PERL5OPT will not be examined until foo.pl is actually run (using Automake's test infrastructure, as you note), so the best place to unset it would be just before "$MAKE check || st=$?" (or just change that line to "PERL5OPT= $MAKE check || st=$?".
Unsetting PERL5OPT before the test runs automake defeats the purpose of using PERL5OPT here, which is that warnings raised while running Automake should be fatal.
-- Jacob
