In working on CPAN::Reporter, there's been a snag with test.pl files and
ExtUtils::MakeMaker since the Makefile runs test.pl directly instead of
through Test::Harness. Since output is captured with "tee" to allow user
interaction during tests (if necessary), the exit code is lost. Thus, while
determining t/*.t success or failure can be done by parsing output for
Test::Harness diagnostic messages, determining test.pl exit codes means not
running under "tee" and thus not having any output to report. Thanks to Tim
Bunce for suggesting a way out: parse the output for the error string from
"make".
I was daunted at first by having to reliably do this across any make
program, but after some experimentation with GNU make on linux and both
dmake and nmake on Win32, I think the following regex will work:
qr/$Config{make}.*?:.*?error/i
This will seriously simplify how test.pl files are handled by
CPAN::Reporter.
So -- to make this more robust, I'm looking for any make error string that
breaks this regex. Any failing Makefile should do. E.g.:
all:
perl -e "die"
If you have access to other platforms, please see what your "make" program
returns on failure and let me know.
Thanks very much.
Regards,
David Golden