I'm trying to specify a pre-req to not get superfluous errors
in my tests -- specifically, I need to have
the "Windows" OS module be >= 6.0.0.

I.e. some tests involving / testing for proper output
on STDERR don't work on WinXP -- and since it is
no longer a supported OS, I want to weed out failed tests
from it since I cannot support an OS that is no longer
being maintained.

I tried checking for the OS and BAILING out before
running the test, but BAIL OUT just causes a fail.

Isn't BAILOUT the supported way to abort due to a
due to missing pre-reqs or is there another function
I should be using?

Search Discussions

  • Aristotle Pagaltzis at Mar 5, 2016 at 1:03 am

    * L Walsh [2016-03-04 23:40]:
    I tried checking for the OS and BAILING out before running the test,
    but BAIL OUT just causes a fail.
    That’s as it’s supposed to be.

    Normally, when you run a module’s tests, all test programs are run, and
    all tests within each are run.

    BAIL_OUT is just a way to to abort the current test program, as well as
    tell the test harness “don’t bother running the others” – typically used
    when some test failure implies that all the other tests will fail also.
    Isn't BAILOUT the supported way to abort due to a due to missing
    pre-reqs or is there another function I should be using?
    Generally this sort of thing is done in Makefile.PL, rather than the
    tests. If you exit 0 before a Makefile is generated, then no report
    will be sent. You can also die with the magic string “OS unsupported”
    (has to be written exactly like that), in which case an NA report will
    be sent (rather than a FAIL (or no report at all)).

    However,
    I'm trying to specify a pre-req to not get superfluous errors in my
    tests -- specifically, I need to have the "Windows" OS module be >=
    6.0.0.
    … if this really were a module, it should be sufficient to just declare
    it as a prereq with that minimum version. (I don’t see such a module on
    CPAN… did you mean “module” metaphorically here?)

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>
  • Serguei Trouchelle at Mar 5, 2016 at 3:32 am

    L Walsh wrote:

    I tried checking for the OS and BAILING out before
    running the test, but BAIL OUT just causes a fail.

    Isn't BAILOUT the supported way to abort due to a
    due to missing pre-reqs or is there another function
    I should be using?
    You should "plan skip_all => 'OS not supported';"

    --
    S.T.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcpan-testers-discuss @
categoriesperl
postedMar 4, '16 at 10:37p
activeMar 5, '16 at 3:32a
posts3
users3
websitecpan.org

People

Translate

site design / logo © 2021 Grokbase