I think you'll find that --ignore-exit is indeed ignoring the exit value; however, it is not ignoring failed tests.

In "... our own code for generating the TAP output ...", you'll probably need to implement something along the lines of TODO or SKIP that Test::More provides which, in your code, ignores failed tests where that would be a valid thing to do.

Consider these four runs:

$ for i in exit_0_test_todo.t exit_1_test_todo.t; do cat $i; echo "--- +-------------"; prove --failures $i; echo "============"; prove --fai +lures --ignore-exit $i; echo "============"; done use strict; use warnings; use Test::More tests => 1; TODO: { local $TODO = 'WIP'; is 1, 0, 'Tickety-boo'; }; exit 0; ---------------- exit_0_test_todo.t .. ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.03 cusr + 0.06 csys = 0.12 CPU) Result: PASS ============ exit_0_test_todo.t .. ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.02 usr 0.02 sys + 0.03 cusr + 0.06 csys = 0.12 CPU) Result: PASS ============ use strict; use warnings; use Test::More tests => 1; TODO: { local $TODO = 'WIP'; is 1, 0, 'Tickety-boo'; }; exit 1; ---------------- exit_1_test_todo.t .. 1/1 # Looks like your test exited with 1 just af +ter 1. exit_1_test_todo.t .. Dubious, test returned 1 (wstat 256, 0x100) All 1 subtests passed Test Summary Report ------------------- exit_1_test_todo.t (Wstat: 256 Tests: 1 Failed: 0) Non-zero exit status: 1 Files=1, Tests=1, 1 wallclock secs ( 0.03 usr 0.02 sys + 0.03 cusr + 0.06 csys = 0.14 CPU) Result: FAIL ============ exit_1_test_todo.t .. 1/1 # Looks like your test exited with 1 just af +ter 1. exit_1_test_todo.t .. ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.06 cusr + 0.03 csys = 0.12 CPU) Result: PASS ============

— Ken


In reply to Re^3: Is prove's --ignore-exit flag incomplete or ignored? by kcott
in thread Is prove's --ignore-exit flag incomplete or ignored? by songmaster

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.