.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "TAP::Harness::Archive 3pm" .TH TAP::Harness::Archive 3pm "2022-11-19" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" TAP::Harness::Archive \- Create an archive of TAP test results .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use TAP::Harness::Archive; \& my $harness = TAP::Harness::Archive\->new(\e%args); \& $harness\->runtests(@tests); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is a direct subclass of TAP::Harness and behaves in exactly the same way except for one detail. In addition to outputting a running progress of the tests and an ending summary it can also capture all of the raw \s-1TAP\s0 from the individual test files or streams into an archive file (\f(CW\*(C`.tar\*(C'\fR or \f(CW\*(C`.tar.gz\*(C'\fR). .SH "METHODS" .IX Header "METHODS" All methods are exactly the same as our base TAP::Harness except for the following. .SS "new" .IX Subsection "new" In addition to the options that TAP::Harness allow to this method, we also allow the following: .IP "archive" 4 .IX Item "archive" This is the name of the archive file to generate. We use Archive::Tar in the background so we only support \f(CW\*(C`.tar\*(C'\fR and \f(CW\*(C`.tar.gz\*(C'\fR archive file formats. This can optionally be an existing directory that will have the \s-1TAP\s0 archive's contents deposited therein without any file archiving (no Archive::Tar involved). .IP "extra_files" 4 .IX Item "extra_files" This is an array reference to extra files that you want to include in the \s-1TAP\s0 archive but which are not \s-1TAP\s0 files themselves. This is useful if you want to include some log files that contain useful information about the test run. .IP "extra_properties" 4 .IX Item "extra_properties" This is a hash reference of extra properties that you've collected during your test run. Some things you might want to include are the Perl version, the system's architecture, the operating system, etc. .SS "runtests" .IX Subsection "runtests" Takes the same arguments as TAP::Harness's version and returns the same thing (a TAP::Parser::Aggregator object). The only difference is that in addition to the normal test running and progress output we also create the \s-1TAP\s0 Archive when it's all done. .SS "aggregator_from_archive" .IX Subsection "aggregator_from_archive" This class method will return a TAP::Parser::Aggregator object when given a \s-1TAP\s0 Archive to open and parse. It's pretty much the reverse of creating a \s-1TAP\s0 Archive from using \f(CW\*(C`new\*(C'\fR and \f(CW\*(C`runtests\*(C'\fR. .PP It takes a hash of arguments which are as follows: .IP "archive" 4 .IX Item "archive" The path to the archive file. This can also be a directory if you created the archive as a directory. This is required. .IP "parser_callbacks" 4 .IX Item "parser_callbacks" This is a hash ref containing callbacks for the TAP::Parser objects that are created while parsing the \s-1TAP\s0 files. See the TAP::Parser documentation for details about these callbacks. .IP "made_parser_callback" 4 .IX Item "made_parser_callback" This callback is executed every time a new TAP::Parser object is created. It will be passed the new parser object, the name of the file to be parsed, and also the full (temporary) path of that file. .IP "meta_yaml_callback" 4 .IX Item "meta_yaml_callback" This is a subroutine that will be called if we find and parse a \s-1YAML\s0 file containing meta information about the test run in the archive. The structure of the \s-1YAML\s0 file will be passed in as an argument. .PP .Vb 11 \& my $aggregator = TAP::Harness::Archive\->aggregator_from_archive( \& { \& archive => \*(Aqmy_tests.tar.gz\*(Aq, \& parser_callbacks => { \& plan => sub { warn "Nice to see you plan ahead..." }, \& unknown => sub { warn "Your TAP is bad!" }, \& }, \& made_parser_callback => sub { \& my ($parser, $file, $full_path) = @_; \& warn "$file is temporarily located at $full_path\en"; \& } \& \& } \& ); .Ve .SH "AUTHOR" .IX Header "AUTHOR" Michael Peters, \f(CW\*(C`\*(C'\fR .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to \&\f(CW\*(C`bug\-tap\-harness\-archive at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH "SUPPORT" .IX Header "SUPPORT" You can find documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc TAP::Harness::Archive .Ve .PP You can also look for information at: .IP "\(bu" 4 AnnoCPAN: Annotated \s-1CPAN\s0 documentation .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp .IP "\(bu" 4 \&\s-1RT: CPAN\s0's request tracker .Sp .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" .IP "\(bu" 4 A big thanks to Plus Three, \s-1LP\s0 () for sponsoring my work on this module and other open source pursuits. .IP "\(bu" 4 Andy Armstrong .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2007 Michael Peters, all rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.