Change 33091 by [EMAIL PROTECTED] on 2008/01/28 13:58:55
Upgrade to Test::Harnes 3.07
Affected files ...
... //depot/perl/lib/App/Prove.pm#3 edit
... //depot/perl/lib/App/Prove/State.pm#3 edit
... //depot/perl/lib/TAP/Base.pm#3 edit
... //depot/perl/lib/TAP/Formatter/Color.pm#3 edit
... //depot/perl/lib/TAP/Formatter/Console.pm#3 edit
... //depot/perl/lib/TAP/Formatter/Console/ParallelSession.pm#3 edit
... //depot/perl/lib/TAP/Formatter/Console/Session.pm#3 edit
... //depot/perl/lib/TAP/Harness.pm#3 edit
... //depot/perl/lib/TAP/Parser.pm#3 edit
... //depot/perl/lib/TAP/Parser/Aggregator.pm#3 edit
... //depot/perl/lib/TAP/Parser/Grammar.pm#3 edit
... //depot/perl/lib/TAP/Parser/Iterator.pm#3 edit
... //depot/perl/lib/TAP/Parser/Iterator/Array.pm#3 edit
... //depot/perl/lib/TAP/Parser/Iterator/Process.pm#3 edit
... //depot/perl/lib/TAP/Parser/Iterator/Stream.pm#3 edit
... //depot/perl/lib/TAP/Parser/Multiplexer.pm#3 edit
... //depot/perl/lib/TAP/Parser/Result.pm#3 edit
... //depot/perl/lib/TAP/Parser/Result/Bailout.pm#3 edit
... //depot/perl/lib/TAP/Parser/Result/Comment.pm#3 edit
... //depot/perl/lib/TAP/Parser/Result/Plan.pm#3 edit
... //depot/perl/lib/TAP/Parser/Result/Test.pm#3 edit
... //depot/perl/lib/TAP/Parser/Result/Unknown.pm#3 edit
... //depot/perl/lib/TAP/Parser/Result/Version.pm#3 edit
... //depot/perl/lib/TAP/Parser/Result/YAML.pm#3 edit
... //depot/perl/lib/TAP/Parser/Source.pm#3 edit
... //depot/perl/lib/TAP/Parser/Source/Perl.pm#3 edit
... //depot/perl/lib/TAP/Parser/YAMLish/Reader.pm#3 edit
... //depot/perl/lib/TAP/Parser/YAMLish/Writer.pm#3 edit
... //depot/perl/lib/Test/Harness.pm#98 edit
... //depot/perl/lib/Test/Harness/Changes#29 edit
Differences ...
==== //depot/perl/lib/App/Prove.pm#3 (text) ====
Index: perl/lib/App/Prove.pm
--- perl/lib/App/Prove.pm#2~32673~ 2007-12-20 10:25:46.000000000 -0800
+++ perl/lib/App/Prove.pm 2008-01-28 05:58:55.000000000 -0800
@@ -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/perl/lib/App/Prove/State.pm#3 (text) ====
Index: perl/lib/App/Prove/State.pm
--- perl/lib/App/Prove/State.pm#2~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/App/Prove/State.pm 2008-01-28 05:58:55.000000000 -0800
@@ -20,11 +20,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/perl/lib/TAP/Base.pm#3 (text) ====
Index: perl/lib/TAP/Base.pm
--- perl/lib/TAP/Base.pm#2~32673~ 2007-12-20 10:25:46.000000000 -0800
+++ perl/lib/TAP/Base.pm 2008-01-28 05:58:55.000000000 -0800
@@ -9,11 +9,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
my $GOT_TIME_HIRES;
==== //depot/perl/lib/TAP/Formatter/Color.pm#3 (text) ====
Index: perl/lib/TAP/Formatter/Color.pm
--- perl/lib/TAP/Formatter/Color.pm#2~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Formatter/Color.pm 2008-01-28 05:58:55.000000000 -0800
@@ -70,11 +70,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/perl/lib/TAP/Formatter/Console.pm#3 (text) ====
Index: perl/lib/TAP/Formatter/Console.pm
--- perl/lib/TAP/Formatter/Console.pm#2~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Formatter/Console.pm 2008-01-28 05:58:55.000000000 -0800
@@ -52,11 +52,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Formatter/Console/ParallelSession.pm 2008-01-28
05:58:55.000000000 -0800
@@ -48,11 +48,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Formatter/Console/Session.pm 2008-01-28 05:58:55.000000000
-0800
@@ -36,11 +36,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/perl/lib/TAP/Harness.pm#3 (text) ====
Index: perl/lib/TAP/Harness.pm
--- perl/lib/TAP/Harness.pm#2~32673~ 2007-12-20 10:25:46.000000000 -0800
+++ perl/lib/TAP/Harness.pm 2008-01-28 05:58:55.000000000 -0800
@@ -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/perl/lib/TAP/Parser.pm#3 (text) ====
Index: perl/lib/TAP/Parser.pm
--- perl/lib/TAP/Parser.pm#2~32673~ 2007-12-20 10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser.pm 2008-01-28 05:58:55.000000000 -0800
@@ -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/perl/lib/TAP/Parser/Aggregator.pm#3 (text) ====
Index: perl/lib/TAP/Parser/Aggregator.pm
--- perl/lib/TAP/Parser/Aggregator.pm#2~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Aggregator.pm 2008-01-28 05:58:55.000000000 -0800
@@ -10,11 +10,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 SYNOPSIS
==== //depot/perl/lib/TAP/Parser/Grammar.pm#3 (text) ====
Index: perl/lib/TAP/Parser/Grammar.pm
--- perl/lib/TAP/Parser/Grammar.pm#2~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Grammar.pm 2008-01-28 05:58:55.000000000 -0800
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/perl/lib/TAP/Parser/Iterator.pm#3 (text) ====
Index: perl/lib/TAP/Parser/Iterator.pm
--- perl/lib/TAP/Parser/Iterator.pm#2~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Iterator.pm 2008-01-28 05:58:55.000000000 -0800
@@ -13,11 +13,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 SYNOPSIS
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser/Iterator/Array.pm 2008-01-28 05:58:55.000000000
-0800
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 SYNOPSIS
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser/Iterator/Process.pm 2008-01-28 05:58:55.000000000
-0800
@@ -19,11 +19,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 SYNOPSIS
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser/Iterator/Stream.pm 2008-01-28 05:58:55.000000000
-0800
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 SYNOPSIS
==== //depot/perl/lib/TAP/Parser/Multiplexer.pm#3 (text) ====
Index: perl/lib/TAP/Parser/Multiplexer.pm
--- perl/lib/TAP/Parser/Multiplexer.pm#2~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Multiplexer.pm 2008-01-28 05:58:55.000000000 -0800
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 SYNOPSIS
==== //depot/perl/lib/TAP/Parser/Result.pm#3 (text) ====
Index: perl/lib/TAP/Parser/Result.pm
--- perl/lib/TAP/Parser/Result.pm#2~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Result.pm 2008-01-28 05:58:55.000000000 -0800
@@ -27,11 +27,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head2 DESCRIPTION
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser/Result/Bailout.pm 2008-01-28 05:58:55.000000000
-0800
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser/Result/Comment.pm 2008-01-28 05:58:55.000000000
-0800
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Result/Plan.pm 2008-01-28 05:58:55.000000000 -0800
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Result/Test.pm 2008-01-28 05:58:55.000000000 -0800
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser/Result/Unknown.pm 2008-01-28 05:58:55.000000000
-0800
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser/Result/Version.pm 2008-01-28 05:58:55.000000000
-0800
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Result/YAML.pm 2008-01-28 05:58:55.000000000 -0800
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/perl/lib/TAP/Parser/Source.pm#3 (text) ====
Index: perl/lib/TAP/Parser/Source.pm
--- perl/lib/TAP/Parser/Source.pm#2~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Source.pm 2008-01-28 05:58:55.000000000 -0800
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/TAP/Parser/Source/Perl.pm 2008-01-28 05:58:55.000000000 -0800
@@ -16,11 +16,11 @@
=head1 VERSION
-Version 3.06
+Version 3.07
=cut
-$VERSION = '3.06';
+$VERSION = '3.07';
=head1 DESCRIPTION
==== //depot/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser/YAMLish/Reader.pm 2008-01-28 05:58:55.000000000
-0800
@@ -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/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~32673~ 2007-12-20
10:25:46.000000000 -0800
+++ perl/lib/TAP/Parser/YAMLish/Writer.pm 2008-01-28 05:58:55.000000000
-0800
@@ -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/perl/lib/Test/Harness.pm#98 (text) ====
Index: perl/lib/Test/Harness.pm
--- perl/lib/Test/Harness.pm#97~32673~ 2007-12-20 10:25:46.000000000 -0800
+++ perl/lib/Test/Harness.pm 2008-01-28 05:58:55.000000000 -0800
@@ -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/perl/lib/Test/Harness/Changes#29 (text) ====
Index: perl/lib/Test/Harness/Changes
--- perl/lib/Test/Harness/Changes#28~32673~ 2007-12-20 10:25:46.000000000
-0800
+++ perl/lib/Test/Harness/Changes 2008-01-28 05:58:55.000000000 -0800
@@ -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.