songmaster has asked for the wisdom of the Perl Monks concerning the following question:
I maintain a non-Perl build system that uses APP::Prove for running tests and displaying the results, with our own code for generating the TAP output from our C/C++ test programs. Those test programs are each exec'd from their own wrapper script (written in Perl) and exit with a non-zero status if any of the tests fail (this exit status is needed for other features of our build/test system). Is there an easy way to suppress the "Dubious" message that gets displayed when a non-zero status is returned, as shown below?
$ prove --failures --ignore-exit epicsTypesTest.t epicsTypesTest.t .. 1/10 not ok 1 - sizeof(epicsInt8) == 10 epicsTypesTest.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/10 subtests Test Summary Report ------------------- epicsTypesTest.t (Wstat: 256 Tests: 10 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=10, 0 wallclock secs (0.03 usr + 0.01 sys = 0.04 CPU) Result: FAIL
Note that I'm already passing the --ignore-exit flag, but it doesn't seem to make any difference to what gets displayed. My App::Prove and TAP::Harness both say they are version 3.4.2. The manpage for prove says:
--ignore-exit Ignore exit status from test scripts.
and TAP::Parser's perldoc says:
"ignore_exit" $parser->ignore_exit(1); Tell the parser to ignore the exit status from the test when determining whether the test passed. Normally tests with non-zero exit status are considered to have failed even if all individual tests passed. In cases where it is not possible to control the exit value of the test script use this option to ignore it.
Thanks for any insight or hints!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is prove's --ignore-exit flag incomplete or ignored?
by hippo (Archbishop) on Dec 18, 2020 at 22:36 UTC | |
by songmaster (Beadle) on Dec 19, 2020 at 00:00 UTC | |
by kcott (Archbishop) on Dec 19, 2020 at 05:36 UTC | |
by songmaster (Beadle) on Dec 21, 2020 at 20:42 UTC |