App-TestOnTap
view release on metacpan or search on metacpan
lib/App/TestOnTap/Args.pm view on Meta::CPAN
usage => 0,
help => 0,
manual => 0,
version => 0,
configuration => undef, # no alternate config
define => {}, # arbitrary key=value defines
skip => undef, # no skip filter
include => undef, # no include filter
jobs => 1, # run only one job at a time (no parallelism)
order => undef, # have no particular strategy for test order
timer => 0, # don't show timing output
workdirectory => undef, # explicit directory to use
savedirectory => undef, # don't save results (unless -archive is used)
archive => 0, # don't save results as archive
v => 0, # don't let through output from tests
harness => 1, # use the normal test harness
merge => undef, # ask the harness to merge stdout/stderr of tests
dryrun => 0, # don't actually run tests
# hidden
#
lib/App/TestOnTap/Args.pm view on Meta::CPAN
'usage|?',
'help|h',
'manual',
'version',
'configuration|cfg=s',
'define|D=s%',
'skip=s',
'include=s',
'jobs=i',
'order=s',
'timer!',
'workdirectory=s',
'savedirectory=s',
'archive',
'v|verbose+',
'harness!',
'merge!',
'dryrun!',
# hidden
#
lib/App/TestOnTap/Args.pm view on Meta::CPAN
local $SIG{__WARN__} = sub { die(@_) };
GetOptionsFromArray(\@argv, \%rawOpts, @specs)
};
if ($@)
{
pod2usage(-input => $argsPodInput, -message => "Failure parsing options:\n $@", -exitval => 255, -verbose => 0);
}
# simple copies
#
$self->{$_} = $rawOpts{$_} foreach (qw(v archive timer harness dryrun));
$self->{defines} = $rawOpts{define};
# help with the hidden flags...
#
pod2usage(-input => $_argsPodInput, -exitval => 0, -verbose => 2, -noperldoc => 1) if $rawOpts{_help};
# for the special selection of using --_pp* turn over to packinfo
#
my %packHelperOpts;
lib/App/TestOnTap/Args.pm view on Meta::CPAN
{
my $self = shift;
return $self->{preprocess};
}
sub getTimer
{
my $self = shift;
return $self->{timer};
}
sub getArchive
{
my $self = shift;
return $self->{archive};
}
sub getDefines
lib/App/TestOnTap/Args.pod view on Meta::CPAN
|
--manual
|
--version
]
[ -v | --verbose [ -v ... ] ]
[ --workdirectory <path> ]
[ { --skip || --include } <query> ]
[ --jobs <n> ]
[ --order <strategy> ]
[ --timer || --no-timer ]
[ --harness || --no-harness ]
[ --dryrun || --no-dryrun ]
[ --merge || --no-merge ]
[ --configuration <cfgfile> || --cfg <cfgfile> ]
[ --archive ]
[ --savedirectory <path> ]
[ --define | -D <key>=<value> [ --define ... ] ]
<suitepath>
[<suiteargs> ...]
lib/App/TestOnTap/Args.pod view on Meta::CPAN
'sm1', 'sm2', 'sm10' etc.
Adding the initial C<r> causes the order to be reversed.
=item * random
This will explicitly shuffle the order randomly.
=back
=item B<--timer>, B<--no-timer>
Using C<--timer> turns on the display of timing information for tests when running.
Note that the information is always present in persisted results, this just controls the display when running a suite.
=item B<--harness>, B<--no-harness>
By default test output is handled by a test harness.
Using C<--no-harness> turns on a special mode where tests are run with no capture and parsing of
output. Printouts go directly to stdout/err, and stdin is active.
lib/App/TestOnTap/Args.pod view on Meta::CPAN
match = eq(some/test.pl)
cmd = perl -d
and run with:
testontap --no-harness --configuration debug.execmap some/path/to/suite
would start the some/test.pl file under the Perl debugger but run the rest normally.
Note that this renders several options and mechanisms useless:
for example C<--verbose>, C<--jobs>, C<--timer>. Also, the work directory
will miss most of the data normally seen, such as TAP output, aggregated
test results etc. C<--no-harness> will be automatically used when C<--dryrun> is used
=item B<--dryrun>, B<--no-dryrun>
By using C<--dryrun>, C<--no-harness> is implied.
No tests will be actually run, the tests will just be listed in the order they would have run in
the C<--no-harness> format plus lists of what any dependency queries actually select.
lib/App/TestOnTap/Harness.pm view on Meta::CPAN
};
}
sub __getFormatter
{
my $args = shift;
my $formatterArgs =
{
jobs => $args->getJobs(),
timer => $args->getTimer(),
show_count => 1,
verbosity => $args->getVerbose(),
};
return
-t \*STDOUT
? TAP::Formatter::Console->new($formatterArgs)
: TAP::Formatter::File->new($formatterArgs);
}
( run in 1.248 second using v1.01-cache-2.11-cpan-49f99fa48dc )