| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package App::TestOnTap; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 19 |  |  | 19 |  | 164149 | use 5.010_001; | 
|  | 19 |  |  |  |  | 183 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 | 19 |  |  | 19 |  | 104 | use strict; | 
|  | 19 |  |  |  |  | 35 |  | 
|  | 19 |  |  |  |  | 451 |  | 
| 6 | 19 |  |  | 19 |  | 102 | use warnings; | 
|  | 19 |  |  |  |  | 31 |  | 
|  | 19 |  |  |  |  | 1373 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | our $VERSION = '0.059'; | 
| 9 |  |  |  |  |  |  | my $version = $VERSION; | 
| 10 |  |  |  |  |  |  | $VERSION = eval $VERSION; | 
| 11 |  |  |  |  |  |  |  | 
| 12 | 19 |  |  | 19 |  | 8432 | use App::TestOnTap::Args; | 
|  | 19 |  |  |  |  | 78 |  | 
|  | 19 |  |  |  |  | 738 |  | 
| 13 | 19 |  |  | 19 |  | 10392 | use App::TestOnTap::Harness; | 
|  | 19 |  |  |  |  | 71 |  | 
|  | 19 |  |  |  |  | 820 |  | 
| 14 | 19 |  |  | 19 |  | 149 | use App::TestOnTap::Util qw($IS_PACKED); | 
|  | 19 |  |  |  |  | 46 |  | 
|  | 19 |  |  |  |  | 5156 |  | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | # These are (known) implicit dependencies, and listing them like this | 
| 17 |  |  |  |  |  |  | # allows scanners like perlapp to pick up on them | 
| 18 |  |  |  |  |  |  | # | 
| 19 |  |  |  |  |  |  | require TAP::Parser if 0; | 
| 20 |  |  |  |  |  |  | require TAP::Parser::Aggregator if 0; | 
| 21 |  |  |  |  |  |  | require TAP::Parser::Multiplexer if 0; | 
| 22 |  |  |  |  |  |  | require TAP::Formatter::Console::ParallelSession if 0; | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | # main entry point | 
| 25 |  |  |  |  |  |  | # | 
| 26 |  |  |  |  |  |  | sub main | 
| 27 |  |  |  |  |  |  | { | 
| 28 |  |  |  |  |  |  | # as a very special workaround - when running as a packed binary, any PERL5LIB envvar | 
| 29 |  |  |  |  |  |  | # is cleared, but if it's really needed, any TESTONTAP_PERL5LIB will be used to reinsert | 
| 30 |  |  |  |  |  |  | # it here for our children | 
| 31 |  |  |  |  |  |  | # | 
| 32 | 29 | 50 |  | 29 | 0 | 221541 | $ENV{PERL5LIB} = $ENV{TESTONTAP_PERL5LIB} if $ENV{TESTONTAP_PERL5LIB}; | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | # parse raw argv and prepare | 
| 35 |  |  |  |  |  |  | # | 
| 36 | 29 |  |  |  |  | 575 | my $args = App::TestOnTap::Args->new($version, @_); | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | # run all tests | 
| 39 |  |  |  |  |  |  | # | 
| 40 | 27 |  |  |  |  | 389 | my $failed = App::TestOnTap::Harness->new($args)->runtests(); | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | # in case results have been requested... | 
| 43 |  |  |  |  |  |  | # | 
| 44 | 26 |  |  |  |  | 3661 | my $saveDir = $args->getSaveDir(); | 
| 45 | 26 | 100 |  |  |  | 127 | if ($saveDir) | 
| 46 |  |  |  |  |  |  | { | 
| 47 | 2 |  |  |  |  | 11 | my $savePath = $args->getWorkDirManager()->saveResult($saveDir, $args->getArchive()); | 
| 48 | 2 |  |  |  |  | 50 | print "Result saved to '$savePath'\n"; | 
| 49 |  |  |  |  |  |  | } | 
| 50 |  |  |  |  |  |  |  | 
| 51 | 26 | 100 |  |  |  | 195 | warn("At least $failed test(s) failed!\n") if $failed; | 
| 52 |  |  |  |  |  |  |  | 
| 53 | 26 |  |  |  |  | 260 | return $failed; | 
| 54 |  |  |  |  |  |  | } | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | 1; |