logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

App::Yath::Converting - Things you may need to change in your tests before you can use yath.

Authors

       Chad Granum <exodist@cpan.org>

Maintainers

       Chad Granum <exodist@cpan.org>

Name

       App::Yath::Converting - Things you may need to change in your tests before you can use yath.

Non-Tap Formatter

       By default yath tells any Test2 or Test::Builder tests to use Test2::Formatter::Stream instead of
       Test2::Formatter::TAP. This is done in order to make sure as much data as possible makes it to yath, TAP
       is a lossy formater by comparison.

       This is not normally a problem, but tests that do strange things with STDERR/STDOUT, or try to intercept
       output from the regular TAP formatter can have issues with this.

   SOLUTIONSHARNESS-NO-STREAM

       You can add a harness directive to the top of offending tests that tell the harness those specific tests
       should still use the TAP formatter.

           #!/usr/bin/perl
           # HARNESS-NO-STREAM
           ...

       This directive can come after the "#!" line, and after use statements, but must come BEFORE any empty
       lines or runtime statements.

       --no-stream

       You can run yath with the "--no-stream" option, which will have tests default to TAP. This is not
       recommended as TAP is lossy.

Source

       The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.

Tests Are Run Via Fork By Default

       The default mode for yath is to preload a few things, then fork to spawn each test. This is a complicated
       procedure, and it uses goto::file under the hood. Sometimes you have tests that simply will not work this
       way, or tests that verify specific libraries are not already loaded.

   SOLUTIONSHARNESS-NO-PRELOAD

       You can use this harness directive inside your tests to tell yath not to fork, but to instead launch a
       new perl process to run the test.

           #!/usr/bin/perl
           # HARNESS-NO-PRELOAD
           ...

       --no-fork--no-preload

       Both these options tell yath not to preload+fork, but to run ALL tests in new processes. This is slow, it
       is better to mark specific tests that have issues in preload mode.

See Also