Parrot::Configure::Options::Test - Run configuration and build tests along with Configure.pl
In Configure.pl:
use Parrot::Configure::Options; use Parrot::Configure::Options::Test; use Parrot::Configure::Options::Test::Prepare qw( get_preconfiguration_tests get_postconfiguration_tests ); $args = process_options( { argv => [ @ARGV ], mode => q{configure}, } ); $opttest = Parrot::Configure::Options::Test->new($args); $opttest->run_configure_tests( get_preconfiguration_tests() ); $opttest->run_build_tests( get_postconfiguration_tests() );
On command line:
# run tests of configuration tools, then configure perl Configure.pl --test=configure # configure, then run tests of build tools perl Configure.pl --test=build # run tests of configuration tools, then configure, # then run tests of build tools perl Configure.pl --test
Test suites have been constructed which test those of Parrot's configuration and build tools that are written in Perl 5. These tests are not necessarily run when you invoke make test. In any event, running these tests as part of make test is, in a certain sense, running them too late. If you have successfully called Configure.pl and make, you have implicitly demonstrated that the configuration and build tools work (for the most part), so running tests of those tools post-make is somewhat redundant.
On the other hand, tests of the configuration tools are meaningful if run before Configure.pl is invoked and, similarly, tests of the build tools are meaningful if run before make is invoked. Parrot::Configure::Options::Test provides functionality for running such tests.
new()
Purpose
Parrot::Configure::Options::Test constructor.
Arguments
One argument: The hash reference which is the return value of Parrot::Configure::Options::process_options().
Parrot::Configure::Options::process_options()
Return Value
Parrot::Configure::Options::Test object.
Comment
run_configure_tests()
Run tests of Parrot's configuration tools.
List of test files, typically supplied by Parrot::Configure::Options::Test::Prepare::get_preconfiguration_tests().
Parrot::Configure::Options::Test::Prepare::get_preconfiguration_tests()
None.
run_build_tests()
Run tests of Parrot's build tools. Also, run tests of certain aspects of the configuration process which, for legacy reasons, must run after Configure.pl has completed execution.
List of test files, typically supplied by Parrot::Configure::Options::Test::Prepare::get_postconfiguration_tests().
Parrot::Configure::Options::Test::Prepare::get_postconfiguration_tests()
James E Keenan, in response to request by Jerry Gay in http://rt.perl.org/rt3/Ticket/Display.html?id=42690.
Configure.pl. lib/Parrot/Configure/Options.pm.
To install Parrot::Op, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parrot::Op
CPAN shell
perl -MCPAN -e shell install Parrot::Op
For more information on module installation, please visit the detailed CPAN module installation guide.