Change 33964 by [EMAIL PROTECTED] on 2008/05/31 14:39:50 Integrate: [ 33091] Upgrade to Test::Harnes 3.07 [ 33092] Warning cleanup, and avoid a double call to uc
Affected files ... ... //depot/maint-5.10/perl/lib/App/Prove.pm#3 integrate ... //depot/maint-5.10/perl/lib/App/Prove/State.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Base.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Formatter/Color.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Formatter/Console.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Formatter/Console/ParallelSession.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Formatter/Console/Session.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Harness.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Aggregator.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Grammar.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Iterator.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Array.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Process.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Stream.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Multiplexer.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Result.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Bailout.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Comment.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Plan.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Test.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Unknown.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Version.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Result/YAML.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Source.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/Source/Perl.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/YAMLish/Reader.pm#3 integrate ... //depot/maint-5.10/perl/lib/TAP/Parser/YAMLish/Writer.pm#3 integrate ... //depot/maint-5.10/perl/lib/Test/Harness.pm#4 integrate ... //depot/maint-5.10/perl/lib/Test/Harness/Changes#4 integrate Differences ... ==== //depot/maint-5.10/perl/lib/App/Prove.pm#3 (text) ==== Index: perl/lib/App/Prove.pm --- perl/lib/App/Prove.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/App/Prove.pm 2008-05-31 07:39:50.000000000 -0700 @@ -15,11 +15,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION @@ -190,6 +190,7 @@ 'b|blib' => \$self->{blib}, 's|shuffle' => \$self->{shuffle}, 'color!' => \$self->{color}, + 'colour!' => \$self->{color}, 'c' => \$self->{color}, 'harness=s' => \$self->{harness}, 'formatter=s' => \$self->{formatter}, @@ -407,6 +408,7 @@ $self->_shuffle(@tests) if $self->shuffle; @tests = reverse @tests if $self->backwards; + local $ENV{TEST_VERBOSE} = 1 if $self->verbose; $self->_runtests( $self->_get_args, @tests ); } @@ -449,6 +451,10 @@ push @switches, '-w'; } + if ( defined( my $hps = $ENV{HARNESS_PERL_SWITCHES} ) ) { + push @switches, $hps; + } + return @switches ? [EMAIL PROTECTED] : (); } ==== //depot/maint-5.10/perl/lib/App/Prove/State.pm#3 (text) ==== Index: perl/lib/App/Prove/State.pm --- perl/lib/App/Prove/State.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/App/Prove/State.pm 2008-05-31 07:39:50.000000000 -0700 @@ -20,11 +20,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Base.pm#3 (text) ==== Index: perl/lib/TAP/Base.pm --- perl/lib/TAP/Base.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Base.pm 2008-05-31 07:39:50.000000000 -0700 @@ -9,11 +9,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; my $GOT_TIME_HIRES; ==== //depot/maint-5.10/perl/lib/TAP/Formatter/Color.pm#3 (text) ==== Index: perl/lib/TAP/Formatter/Color.pm --- perl/lib/TAP/Formatter/Color.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Formatter/Color.pm 2008-05-31 07:39:50.000000000 -0700 @@ -70,11 +70,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Formatter/Console.pm#3 (text) ==== Index: perl/lib/TAP/Formatter/Console.pm --- perl/lib/TAP/Formatter/Console.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Formatter/Console.pm 2008-05-31 07:39:50.000000000 -0700 @@ -52,11 +52,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Formatter/Console/ParallelSession.pm#3 (text) ==== Index: perl/lib/TAP/Formatter/Console/ParallelSession.pm --- perl/lib/TAP/Formatter/Console/ParallelSession.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Formatter/Console/ParallelSession.pm 2008-05-31 07:39:50.000000000 -0700 @@ -48,11 +48,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Formatter/Console/Session.pm#3 (text) ==== Index: perl/lib/TAP/Formatter/Console/Session.pm --- perl/lib/TAP/Formatter/Console/Session.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Formatter/Console/Session.pm 2008-05-31 07:39:50.000000000 -0700 @@ -36,11 +36,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Harness.pm#3 (text) ==== Index: perl/lib/TAP/Harness.pm --- perl/lib/TAP/Harness.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Harness.pm 2008-05-31 07:39:50.000000000 -0700 @@ -22,11 +22,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; $ENV{HARNESS_ACTIVE} = 1; $ENV{HARNESS_VERSION} = $VERSION; @@ -330,21 +330,15 @@ my $aggregate = TAP::Parser::Aggregator->new; $self->_make_callback( 'before_runtests', $aggregate ); + $aggregate->start; $self->aggregate_tests( $aggregate, @tests ); + $aggregate->stop; $self->formatter->summary($aggregate); $self->_make_callback( 'after_runtests', $aggregate ); return $aggregate; } -=head3 C<aggregate_tests> - - $harness->aggregate_tests( $aggregate, @tests ); - -Tests will be run in the order found. - -=cut - sub _after_test { my ( $self, $aggregate, $test, $parser ) = @_; @@ -447,6 +441,54 @@ return; } +=head3 C<aggregate_tests> + + $harness->aggregate_tests( $aggregate, @tests ); + +Run the named tests and display a summary of result. Tests will be run +in the order found. + +Test results will be added to the supplied L<TAP::Parser::Aggregator>. +C<aggregate_tests> may be called multiple times to run several sets of +tests. Multiple C<Test::Harness> instances may be used to pass results +to a single aggregator so that different parts of a complex test suite +may be run using different C<TAP::Harness> settings. This is useful, for +example, in the case where some tests should run in parallel but others +are unsuitable for parallel execution. + + my $formatter = TAP::Formatter::Console->new; + my $ser_harness = TAP::Harness->new( { formatter => $formatter } ); + my $par_harness = TAP::Harness->new( { formatter => $formatter, + jobs => 9 } ); + my $aggregator = TAP::Parser::Aggregator->new; + + $aggregator->start(); + $ser_harness->aggregate_tests( $aggregator, @ser_tests ); + $par_harness->aggregate_tests( $aggregator, @par_tests ); + $aggregator->stop(); + $formatter->summary( $aggregator ); + +Note that for simpler testing requirements it will often be possible to +replace the above code with a single call to C<runtests>. + +Each elements of the @tests array is either + +=over + +=item * the file name of a test script to run + +=item * a reference to a [ file name, display name ] + +=back + +When you supply a separate display name it becomes possible to run a +test more than once; the display name is effectively the alias by which +the test is known inside the harness. The harness doesn't care if it +runs the same script more than once along as each invocation uses a +different name. + +=cut + sub aggregate_tests { my ( $self, $aggregate, @tests ) = @_; @@ -456,7 +498,6 @@ # Formatter gets only names $self->formatter->prepare( map { $_->[1] } @expanded ); - $aggregate->start; if ( $self->jobs > 1 ) { if ( $self->fork ) { @@ -470,8 +511,6 @@ $self->_aggregate_single( $aggregate, @expanded ); } - $aggregate->stop; - return; } ==== //depot/maint-5.10/perl/lib/TAP/Parser.pm#3 (text) ==== Index: perl/lib/TAP/Parser.pm --- perl/lib/TAP/Parser.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser.pm 2008-05-31 07:39:50.000000000 -0700 @@ -19,11 +19,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; my $DEFAULT_TAP_VERSION = 12; my $MAX_TAP_VERSION = 13; @@ -1542,7 +1542,7 @@ =head1 COPYRIGHT & LICENSE -Copyright 2006-2007 Curtis "Ovid" Poe, all rights reserved. +Copyright 2006-2008 Curtis "Ovid" Poe, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. ==== //depot/maint-5.10/perl/lib/TAP/Parser/Aggregator.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Aggregator.pm --- perl/lib/TAP/Parser/Aggregator.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Aggregator.pm 2008-05-31 07:39:50.000000000 -0700 @@ -10,11 +10,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 SYNOPSIS ==== //depot/maint-5.10/perl/lib/TAP/Parser/Grammar.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Grammar.pm --- perl/lib/TAP/Parser/Grammar.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Grammar.pm 2008-05-31 07:39:50.000000000 -0700 @@ -12,11 +12,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION @@ -133,7 +133,7 @@ } return $self->_make_test_token( $line, $ok, $num, $desc, - uc $dir, $explanation + $dir, $explanation ); }, }, @@ -372,7 +372,7 @@ ok => $ok, test_num => $num, description => _trim($desc), - directive => uc($dir), + directive => uc($dir || ""), explanation => _trim($explanation), raw => $line, type => 'test', ==== //depot/maint-5.10/perl/lib/TAP/Parser/Iterator.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Iterator.pm --- perl/lib/TAP/Parser/Iterator.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Iterator.pm 2008-05-31 07:39:50.000000000 -0700 @@ -13,11 +13,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 SYNOPSIS ==== //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Array.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Iterator/Array.pm --- perl/lib/TAP/Parser/Iterator/Array.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Iterator/Array.pm 2008-05-31 07:39:50.000000000 -0700 @@ -11,11 +11,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 SYNOPSIS ==== //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Process.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Iterator/Process.pm --- perl/lib/TAP/Parser/Iterator/Process.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Iterator/Process.pm 2008-05-31 07:39:50.000000000 -0700 @@ -19,11 +19,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 SYNOPSIS ==== //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Stream.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Iterator/Stream.pm --- perl/lib/TAP/Parser/Iterator/Stream.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Iterator/Stream.pm 2008-05-31 07:39:50.000000000 -0700 @@ -11,11 +11,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 SYNOPSIS ==== //depot/maint-5.10/perl/lib/TAP/Parser/Multiplexer.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Multiplexer.pm --- perl/lib/TAP/Parser/Multiplexer.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Multiplexer.pm 2008-05-31 07:39:50.000000000 -0700 @@ -14,11 +14,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 SYNOPSIS ==== //depot/maint-5.10/perl/lib/TAP/Parser/Result.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Result.pm --- perl/lib/TAP/Parser/Result.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Result.pm 2008-05-31 07:39:50.000000000 -0700 @@ -27,11 +27,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head2 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Bailout.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Result/Bailout.pm --- perl/lib/TAP/Parser/Result/Bailout.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Result/Bailout.pm 2008-05-31 07:39:50.000000000 -0700 @@ -12,11 +12,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Comment.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Result/Comment.pm --- perl/lib/TAP/Parser/Result/Comment.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Result/Comment.pm 2008-05-31 07:39:50.000000000 -0700 @@ -12,11 +12,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Plan.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Result/Plan.pm --- perl/lib/TAP/Parser/Result/Plan.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Result/Plan.pm 2008-05-31 07:39:50.000000000 -0700 @@ -12,11 +12,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Test.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Result/Test.pm --- perl/lib/TAP/Parser/Result/Test.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Result/Test.pm 2008-05-31 07:39:50.000000000 -0700 @@ -14,11 +14,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Unknown.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Result/Unknown.pm --- perl/lib/TAP/Parser/Result/Unknown.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Result/Unknown.pm 2008-05-31 07:39:50.000000000 -0700 @@ -14,11 +14,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Version.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Result/Version.pm --- perl/lib/TAP/Parser/Result/Version.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Result/Version.pm 2008-05-31 07:39:50.000000000 -0700 @@ -12,11 +12,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/YAML.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Result/YAML.pm --- perl/lib/TAP/Parser/Result/YAML.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Result/YAML.pm 2008-05-31 07:39:50.000000000 -0700 @@ -12,11 +12,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/Source.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Source.pm --- perl/lib/TAP/Parser/Source.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Source.pm 2008-05-31 07:39:50.000000000 -0700 @@ -14,11 +14,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/Source/Perl.pm#3 (text) ==== Index: perl/lib/TAP/Parser/Source/Perl.pm --- perl/lib/TAP/Parser/Source/Perl.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/Source/Perl.pm 2008-05-31 07:39:50.000000000 -0700 @@ -16,11 +16,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; =head1 DESCRIPTION ==== //depot/maint-5.10/perl/lib/TAP/Parser/YAMLish/Reader.pm#3 (text) ==== Index: perl/lib/TAP/Parser/YAMLish/Reader.pm --- perl/lib/TAP/Parser/YAMLish/Reader.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/YAMLish/Reader.pm 2008-05-31 07:39:50.000000000 -0700 @@ -4,7 +4,7 @@ use vars qw{$VERSION}; -$VERSION = '3.06'; +$VERSION = '3.07'; # TODO: # Handle blessed object syntax @@ -277,7 +277,7 @@ =head1 VERSION -Version 3.06 +Version 3.07 =head1 SYNOPSIS @@ -326,9 +326,9 @@ =head1 COPYRIGHT -Copyright 2007 Andy Armstrong. +Copyright 2007-2008 Andy Armstrong. -Portions copyright 2006-2007 Adam Kennedy. +Portions copyright 2006-2008 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. ==== //depot/maint-5.10/perl/lib/TAP/Parser/YAMLish/Writer.pm#3 (text) ==== Index: perl/lib/TAP/Parser/YAMLish/Writer.pm --- perl/lib/TAP/Parser/YAMLish/Writer.pm#2~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/TAP/Parser/YAMLish/Writer.pm 2008-05-31 07:39:50.000000000 -0700 @@ -4,7 +4,7 @@ use vars qw{$VERSION}; -$VERSION = '3.06'; +$VERSION = '3.07'; my $ESCAPE_CHAR = qr{ [ \x00-\x1f \" ] }x; @@ -147,7 +147,7 @@ =head1 VERSION -Version 3.06 +Version 3.07 =head1 SYNOPSIS @@ -243,7 +243,7 @@ =head1 COPYRIGHT -Copyright 2007 Andy Armstrong. +Copyright 2007-2008 Andy Armstrong. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. ==== //depot/maint-5.10/perl/lib/Test/Harness.pm#4 (text) ==== Index: perl/lib/Test/Harness.pm --- perl/lib/Test/Harness.pm#3~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/Test/Harness.pm 2008-05-31 07:39:50.000000000 -0700 @@ -21,6 +21,7 @@ $Verbose $Switches $Debug $verbose $switches $debug $Columns + $Color $Directives $Timer $Strap @@ -40,11 +41,11 @@ =head1 VERSION -Version 3.06 +Version 3.07 =cut -$VERSION = '3.06'; +$VERSION = '3.07'; # Backwards compatibility for exportable variable names. *verbose = *Verbose; @@ -71,6 +72,7 @@ $Columns = $ENV{HARNESS_COLUMNS} || $ENV{COLUMNS} || 80; $Columns--; # Some shells have trouble with a full line of text. $Timer = $ENV{HARNESS_TIMER} || 0; +$Color = $ENV{HARNESS_COLOR} || 0; =head1 SYNOPSIS @@ -125,7 +127,7 @@ # Jiggery pokery doesn't appear to work on VMS - so disable it # pending investigation. - $harness->aggregate_tests( $aggregate, @tests ); + _aggregate_tests( $harness, $aggregate, @tests ); } else { my $path_sep = $Config{path_sep}; @@ -153,10 +155,18 @@ $ENV{PERL5LIB} = join( $path_sep, @extra_inc ); } - $harness->aggregate_tests( $aggregate, @tests ); + _aggregate_tests( $harness, $aggregate, @tests ); } } +sub _aggregate_tests { + my ( $harness, $aggregate, @tests ) = @_; + $aggregate->start(); + $harness->aggregate_tests( $aggregate, @tests ); + $aggregate->stop(); + +} + sub runtests { my @tests = @_; @@ -229,12 +239,16 @@ # Do things the old way on VMS... push @lib, _filtered_inc() if IS_VMS; + # If $Verbose isn't numeric default to 1. This helps core. + my $verbosity = ( $Verbose ? ( $Verbose !~ /\d/ ) ? 1 : $Verbose : 0 ); + my $args = { timer => $Timer, directives => $Directives, lib => [EMAIL PROTECTED], switches => [EMAIL PROTECTED], - verbosity => $Verbose, + color => $Color, + verbosity => $verbosity, }; if ( defined( my $env_opt = $ENV{HARNESS_OPTIONS} ) ) { @@ -245,6 +259,9 @@ elsif ( $opt eq 'f' ) { $args->{fork} = 1; } + elsif ( $opt eq 'c' ) { + $args->{color} = 1; + } else { die "Unknown HARNESS_OPTIONS item: $opt\n"; } @@ -563,7 +580,7 @@ =head1 LICENCE AND COPYRIGHT -Copyright (c) 2007, Andy Armstrong C<< <[EMAIL PROTECTED]> >>. All rights reserved. +Copyright (c) 2007-2008, Andy Armstrong C<< <[EMAIL PROTECTED]> >>. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<perlartistic>. ==== //depot/maint-5.10/perl/lib/Test/Harness/Changes#4 (text) ==== Index: perl/lib/Test/Harness/Changes --- perl/lib/Test/Harness/Changes#3~33963~ 2008-05-31 07:37:05.000000000 -0700 +++ perl/lib/Test/Harness/Changes 2008-05-31 07:39:50.000000000 -0700 @@ -1,12 +1,17 @@ Revision history for Test-Harness -3.06 +3.07 2008-01-13 + - prove now supports HARNESS_PERL_SWITCHES. + - restored TEST_VERBOSE to prove. + +3.06 2008-01-01 - Skip t/unicode.t if PERL_UNICODE set. Fixes #31731. Thanks Lukas. - App::Prove::State no longer complains about tests that are deleted. - --state=new and --state=old now consider the modification time of test scripts. + - Made test suite core-compatible. 3.05 2007-12-09 - Skip unicode.t if Encode unavailable End of Patch.