Curtis Jewell > Test-Perl-Dist-0.300 > Test::Perl::Dist

Download:
Test-Perl-Dist-0.300.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.300   Source  

NAME ^

Test::Perl::Dist - Test module for Perl::Dist::WiX and subclasses.

VERSION ^

This document describes Test::Perl::Dist version 0.300

SYNOPSIS ^

        # This is the 901_perl_589.t file from Strawberry.
        #!/usr/bin/perl

        use strict;
        BEGIN {
                $|  = 1;
                $^W = 1;
        }

        use Test::Perl::Dist 0.300;
        use File::Spec::Functions qw(catdir);

        #####################################################################
        # Complete Generation Run

        # Create the dist object
        my $dist = Test::Perl::Dist->new_test_class_medium(
                901, '589', 'Perl::Dist::Strawberry', catdir(qw(xt release))
                msi => 0
        );

        test_run_dist( $dist );

        test_verify_files_medium(901, '58', catdir(qw(xt release));

        done_testing();

DESCRIPTION ^

This module implements a test framework for Perl::Dist::WiX and subclasses of that module.

Using Test::More is not required, as this module re-exports all its functions.

INTERFACE ^

Note that this module exports all routines that are in Test::More, in addition to the routines documented here.

The only difference is in done_testing, as documented below.

new_test_class_short

new_test_class_medium

new_test_class_long

        my $dist = Test::Perl::Dist->new_test_class_medium(
                901, '589', 'Perl::Dist::Strawberry', catdir(qw(xt release)),
                msi => 0
        );

Returns a distribution class to run and test against that is a subclass of the class being tested.

The first parameter is the test number, the second refers to the version of perl to build (589 for perl 5.8.9, for instance), the third is the class being tested, and the fourth is the directory the test is in.

Any parameters after that are passed to the constructor of the distribution class, which passes them on to the class being tested.

If the constructor of the class being tested returns an exception, that exception is printed, and all testing is stopped.

The difference between "short", "medium", and "long" is the expected length of the test. A "short" test installs the dmake binary and should not take more than 5 minutes, a "medium" test installs perl and one additional module and can take about an hour, and a "long" test completes a full build, which can take 4-8 hours on slow machines.

test_run_dist

        test_run_dist( $dist );

This runs the distribution class.

If the class being tested returns an exception when ran, that exception is printed, and all testing is stopped.

test_verify_files_short

test_verify_files_medium

test_verify_files_long

        test_verify_files_medium(901, '58', catdir(qw(xt release)));

This checks that certain files were created.

The first parameter is the test number, the second parameter refers to the first two parts of the perl version ('58' for 5.8.9, '510' for 5.10.0 or 5.10.1), and the third parameter is the directory the test is in.

test_verify_portability

        test_verify_portability(901, $dist->output_base_filename(), catdir(qw(xt release)));

This checks that certain files were created that are required for a portable distribution.

The first parameter is the test number, the second parameter is the base filename of the dist being tested, as returned from output_base_filename, and the third parameter is the directory the test is in.

test_cleanup

        test_cleanup(901, catdir(xt release));

This cleans up the build files if all tests have been successful.

The first parameter is the test number, and the second parameter is the directory the test is in.

done_testing

        done_testing();
        
        # If additional tests were completed.
        done_testing(2);

This tells Test::Perl::Dist that all testing is completed.

If there is a parameter, it is the number of additional tests that were completed.

Test::Perl::Dist keeps track of the tests that it completed and adds it to this number.

DIAGNOSTICS ^

This module implements no diagnostics of its own, but reports diagnostics provided to it by the module being tested.

CONFIGURATION AND ENVIRONMENT ^

There are no configuration files.

$ENV{PERL_RELEASE_TEST_PERLDIST_CPAN} is used to point at a preferred (or local - it can be a file:// URL) mirror for CPAN.

If $ENV{PERL_RELEASE_TEST_FORCEPERL} is defined, it passes forceperl = 1> to the classes being tested, which skips testing perl after compilation. This can speed up testing.

If $ENV{PERL_RELEASE_TEST_FORCE} is defined, it passes force = 1> to the classes being tested, which skips testing both perl and the additional modules installed. This can speed up testing.

DEPENDENCIES ^

This module requires perl 5.8.1, parent version 0.221, File::Remove version 1.42, LWP::Online version 1.07, Test::More version 0.88, URI version 1.40, and Win32 version 0.39.

INCOMPATIBILITIES ^

0.300 has an incompatible API change to precious versions in order to support the tests not being in 't'.

BUGS AND LIMITATIONS ^

No bugs have been reported.

Bugs should be reported via:

1) The CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Perl-Dist if you have an account there.

2) Email to <bug-Test-Perl-Dist@rt.cpan.org> if you do not.

AUTHOR ^

Curtis Jewell <CSJewell@cpan.org>

LICENSE AND COPYRIGHT ^

Copyright (c) 2009-2010, Curtis Jewell <CSJewell@cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either version 5.8.1 or any later version. See perlartistic and perlgpl.

The full text of the license can be found in the LICENSE file included with this module.

DISCLAIMER OF WARRANTY ^

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

syntax highlighting: