# New Ticket Created by Shlomi Fish # Please include the string: [perl #41877] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41877 >
This patch gives an option to use Test::Run[1] as a harness for running the tests using t/harness. This allows one to colour the summary line and to write Test::Run plugins for various purposes. Files affected: t/harness - Patched to accept the --tr command line option and the PARROT_USE_TEST_RUN environment variable that trigger the use of Test::Run. Regards, Shlomi Fish [1] - http://web-cpan.berlios.de/modules/Test-Run/ --------------------------------------------------------------------- Shlomi Fish [EMAIL PROTECTED] Homepage: http://www.shlomifish.org/ Chuck Norris wrote a complete Perl 6 implementation in a day but then destroyed all evidence with his bare hands, so no one will know his secrets.
Index: CREDITS =================================================================== --- CREDITS (revision 17526) +++ CREDITS (working copy) @@ -576,3 +576,7 @@ N: Alek Storm E: [EMAIL PROTECTED] D: Fixed object vtable method overrides in PIR + +N: Shlomi Fish +E: [EMAIL PROTECTED] +D: Allow using Test::Run as a test harness Index: t/harness =================================================================== --- t/harness (revision 17526) +++ t/harness (working copy) @@ -109,6 +109,11 @@ my $run_exec = grep { $_ eq '--run-exec' } @ARGV; @ARGV = grep { $_ ne '--run-exec' } @ARGV; +my $use_test_run = grep { $_ eq '--tr' } @ARGV; [EMAIL PROTECTED] = grep { $_ ne '--tr' } @ARGV; + +$use_test_run ||= $ENV{'PARROT_USE_TEST_RUN'}; + # Suck the short options into the TEST_PROG_ARGS evar: my %opts; getopts('wgjPCSefbvdr?hO:D:', \%opts); @@ -131,6 +136,7 @@ --running-make-test --gc-debug --html + --tr ... run using Test::Run EOF exit; } @@ -168,7 +174,19 @@ my @tests = @ARGV ? map { glob( $_ ) } @ARGV : @default_tests; -unless ($html) { +if ($use_test_run) { + require Test::Run::CmdLine::Iface; + my $test_run = + Test::Run::CmdLine::Iface->new( + { + 'test_files' => [EMAIL PROTECTED], + } + # 'backend_params' => $self->_get_backend_params(), + ); + + $test_run->run(); +} +elsif (!$html) { Test::Harness::runtests(@tests); } else { my @smoke_config_vars = qw(