danlyke has asked for the wisdom of the Perl Monks concerning the following question:

I have, occasionally, found situations in the past where dzil test runs tests out of order or does other weirdness, but usually if I read the output carefully I find something to fix and magically everything works and I don't have to understand it.

However, I have a situation where prove -lr t runs all my tests, in order, just fine. dzil test runs 000-load.t, 003-test-create-ticket.t, 001-init.t and then gives me a

===( 19;1 0/? 6/? 1/? 2/? 1/? )============================= +==Bailout called. Further testing stopped: Test failed. BAIL OUT!. FAILED--Further testing stopped: Test failed. BAIL OUT!.

line. I'm sure there are incantations somewhere deep in Dist::Zilla about which I'm unaware, but I just want to be able to do a dzil release.

Replies are listed 'Best First'.
Re: prove -lr works, dzil test doesn't
by choroba (Cardinal) on Sep 18, 2015 at 20:38 UTC
    I find the line with equal signs and numbers in parentheses familiar. That's how output of
    prove -j5

    looks. So, it seems distzilla runs the tests in parallel in your case, but they aren't ready for that.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: prove -lr works, dzil test doesn't (BAIL_OUT)
by tye (Sage) on Sep 19, 2015 at 16:12 UTC

    The text "Bailout called" means that one of the tests actually called BAIL_OUT($reason); which is documented as:

    Indicates to the harness that things are going so badly all testing should terminate. This includes the running of any additional test scripts.

    And it is my experience that people very often either do not notice or do not understand that last sentence and use BAIL_OUT to stop just the current test file from continuing to run.

    - tye        

Re: prove -lr works, dzil test doesn't
by basiliscos (Pilgrim) on Sep 19, 2015 at 10:11 UTC

    I have the similar effect: prove works, while dzil test not. General rule I found for myself: dzil test should be trusted.

    In my case the reason for fail was caused by using File::ShareDir, and used resource in perl-code: I erased the resource from the current distribution and forget to delete it from the code. I don't know how, but prove took it from already installed package, and tests pas; meanwhile dzil test didn't do that and test failed (correct). When I uninstalled package it stared to fail under prove too.

    Good luck!

    WBR, basiliscos.