| Module-Build-TAPArchive documentation | Contained in the Module-Build-TAPArchive distribution. |
Module::Build::TAPArchive - Extra build targets for creating TAP archives
Easily add support for extra build targets that create TAP archives of the tests.
In your Build.PL
use Module::Builder::TAPArchive;
my $builder = Module::Builder::TAPArchive->new(
...
);
Now you get these build targets
]$ perl Build.PL
]$ ./Build test_archive
The following build targets are provided:
Create a TAP archive to the test run. This archive is placed at
test_archive.tar.gz in the current directory by default. You can override this by
specifying the --archive_file parameter.
./Build test_archive --archive_file mytests.tar.gz
Michael Peters, <mpeters at plusthree.com>
Please report any bugs or feature requests to bug-module-build-taparchive at rt.cpan.org, or through
the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Module-Build-TAPArchive. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Module::Build::TAPArchive
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module-Build-TAPArchive
Copyright 2009 Michael Peters, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Module-Build-TAPArchive documentation | Contained in the Module-Build-TAPArchive distribution. |
package Module::Build::TAPArchive; use warnings; use strict; use base 'Module::Build'; use TAP::Harness::Archive; our $VERSION = '0.04'; __PACKAGE__->add_property(archive_file => 'test_archive.tar.gz');
sub ACTION_test_archive { my $self = shift; $self->{properties}{use_tap_harness} = 1; my $archive_file = $self->{properties}{archive_file} || 'test_archive.tar.gz'; # make Module::Build use our archive method instead of run_tap_harness local *Module::Build::run_tap_harness = sub { my ($self, $tests) = @_; TAP::Harness::Archive->new( { lib => \@INC, verbosity => $self->{properties}{verbose}, switches => [$self->harness_switches], archive => $archive_file, %{$self->tap_harness_args}, } )->runtests(@$tests); }; $self->add_to_cleanup($archive_file); $self->generic_test(type => 'default'); }
1;