Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tagging 3.01, version bump

  • Loading branch information...
commit 9c63dbfd4d28a735e33691bd3826b88facf0ed20 1 parent a40fbe3
@AndyA AndyA authored
Showing with 145 additions and 138 deletions.
  1. +9 −0 Changes
  2. +30 −59 META.yml
  3. +1 −1  README
  4. +3 −3 lib/App/Prove.pm
  5. +2 −2 lib/TAP/Base.pm
  6. +2 −2 lib/TAP/Formatter/Color.pm
  7. +11 −5 lib/TAP/Formatter/Console.pm
  8. +2 −2 lib/TAP/Formatter/Console/ParallelSession.pm
  9. +2 −2 lib/TAP/Formatter/Console/Session.pm
  10. +2 −2 lib/TAP/Harness.pm
  11. +2 −2 lib/TAP/Parser.pm
  12. +4 −3 lib/TAP/Parser/Aggregator.pm
  13. +12 −10 lib/TAP/Parser/Grammar.pm
  14. +2 −2 lib/TAP/Parser/Iterator.pm
  15. +2 −2 lib/TAP/Parser/Iterator/Array.pm
  16. +2 −2 lib/TAP/Parser/Iterator/Process.pm
  17. +2 −2 lib/TAP/Parser/Iterator/Stream.pm
  18. +2 −2 lib/TAP/Parser/Multiplexer.pm
  19. +2 −2 lib/TAP/Parser/Result.pm
  20. +2 −2 lib/TAP/Parser/Result/Bailout.pm
  21. +2 −2 lib/TAP/Parser/Result/Comment.pm
  22. +2 −2 lib/TAP/Parser/Result/Plan.pm
  23. +2 −2 lib/TAP/Parser/Result/Test.pm
  24. +2 −2 lib/TAP/Parser/Result/Unknown.pm
  25. +2 −2 lib/TAP/Parser/Result/Version.pm
  26. +2 −2 lib/TAP/Parser/Result/YAML.pm
  27. +2 −2 lib/TAP/Parser/Source.pm
  28. +2 −2 lib/TAP/Parser/Source/Perl.pm
  29. +2 −2 lib/TAP/Parser/YAMLish/Reader.pm
  30. +2 −2 lib/TAP/Parser/YAMLish/Writer.pm
  31. +2 −2 lib/Test/Harness.pm
  32. +2 −2 smoke/config.surly
  33. +7 −3 smoke/smoke.pl
  34. +15 −1 t/compat/inc-propagation.t
  35. +3 −3 t/prove.t
View
9 Changes
@@ -1,5 +1,14 @@
Revision history for Test-Harness
+3.01 2007-11-12
+ - Fix for RHEL incpush.patch related failure.
+ - Output real time of test completion with --timer
+ - prove -b adds blib/auto to @INC
+ - made SKIP plan parsing even more liberal for pre-v13 TAP
+
+3.00 2007-11-06
+ - Non-dev release. No changes since 2.99_09.
+
2.99_09 2007-11-05
- Implemented TODO-in-PLAN syntax for TAP version 12 and earlier.
View
89 META.yml
@@ -1,7 +1,6 @@
---
name: Test-Harness
-version: 2.99_10
-
+version: 3.01
author:
- 'Andy Armstrong C<< <andy@hexten.net> >>'
abstract: Run Perl standard test scripts with statistics
@@ -19,117 +18,89 @@ recommends:
provides:
App::Prove:
file: lib/App/Prove.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Base:
file: lib/TAP/Base.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Formatter::Color:
file: lib/TAP/Formatter/Color.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Formatter::Console:
file: lib/TAP/Formatter/Console.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Formatter::Console::ParallelSession:
file: lib/TAP/Formatter/Console/ParallelSession.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Formatter::Console::Session:
file: lib/TAP/Formatter/Console/Session.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Harness:
file: lib/TAP/Harness.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser:
file: lib/TAP/Parser.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Aggregator:
file: lib/TAP/Parser/Aggregator.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Grammar:
file: lib/TAP/Parser/Grammar.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Iterator:
file: lib/TAP/Parser/Iterator.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Iterator::Array:
file: lib/TAP/Parser/Iterator/Array.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Iterator::Process:
file: lib/TAP/Parser/Iterator/Process.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Iterator::Stream:
file: lib/TAP/Parser/Iterator/Stream.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Multiplexer:
file: lib/TAP/Parser/Multiplexer.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Result:
file: lib/TAP/Parser/Result.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Result::Bailout:
file: lib/TAP/Parser/Result/Bailout.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Result::Comment:
file: lib/TAP/Parser/Result/Comment.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Result::Plan:
file: lib/TAP/Parser/Result/Plan.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Result::Test:
file: lib/TAP/Parser/Result/Test.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Result::Unknown:
file: lib/TAP/Parser/Result/Unknown.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Result::Version:
file: lib/TAP/Parser/Result/Version.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Result::YAML:
file: lib/TAP/Parser/Result/YAML.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Source:
file: lib/TAP/Parser/Source.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::Source::Perl:
file: lib/TAP/Parser/Source/Perl.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::YAMLish::Reader:
file: lib/TAP/Parser/YAMLish/Reader.pm
- version: 2.99_10
-
+ version: 3.01
TAP::Parser::YAMLish::Writer:
file: lib/TAP/Parser/YAMLish/Writer.pm
- version: 2.99_10
-
+ version: 3.01
Test::Harness:
file: lib/Test/Harness.pm
- version: 2.99_10
-
-generated_by: Module::Build version 0.2808
+ version: 3.01
+generated_by: Module::Build version 0.280801
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
version: 1.2
View
2  README
@@ -1,4 +1,4 @@
-Test-Harness 2.99_10
+Test-Harness 3.21
INSTALLATION
View
6 lib/App/Prove.pm
@@ -15,11 +15,11 @@ App::Prove - Implements the C<prove> command.
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
@@ -373,7 +373,7 @@ sub _get_lib {
push @libs, 'lib';
}
if ( $self->blib ) {
- push @libs, 'blib/lib';
+ push @libs, 'blib/lib', 'blib/arch';
}
if ( @{ $self->includes } ) {
push @libs, @{ $self->includes };
View
4 lib/TAP/Base.pm
@@ -9,11 +9,11 @@ TAP::Base - Base class that provides common functionality to L<TAP::Parser> and
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
my $GOT_TIME_HIRES;
View
4 lib/TAP/Formatter/Color.pm
@@ -70,11 +70,11 @@ TAP::Formatter::Color - Run Perl test scripts with color
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
16 lib/TAP/Formatter/Console.pm
@@ -52,11 +52,11 @@ TAP::Formatter::Console - Harness output delegate for default console output
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
@@ -213,6 +213,8 @@ sub prepare {
$self->_longest($longest);
}
+sub _format_now { strftime "[%H:%M:%S]", localtime }
+
sub _format_name {
my ( $self, $test ) = @_;
my $name = $test;
@@ -224,7 +226,7 @@ sub _format_name {
my $periods = '.' x ( $self->_longest + $extra + 4 - length $test );
if ( $self->timer ) {
- my $stamp = strftime "[%H:%M:%S]", localtime;
+ my $stamp = $self->_format_now();
return "$stamp $name$periods";
}
else {
@@ -280,9 +282,9 @@ an aggregate.
sub summary {
my ( $self, $aggregate ) = @_;
-
+
return if $self->silent;
-
+
my @t = $aggregate->descriptions;
my $tests = \@t;
@@ -291,6 +293,10 @@ sub summary {
my $total = $aggregate->total;
my $passed = $aggregate->passed;
+ if ( $self->timer ) {
+ $self->_output( $self->_format_now(), "\n" );
+ }
+
# TODO: Check this condition still works when all subtests pass but
# the exit status is nonzero
View
4 lib/TAP/Formatter/Console/ParallelSession.pm
@@ -48,11 +48,11 @@ TAP::Formatter::Console::ParallelSession - Harness output delegate for parallel
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Formatter/Console/Session.pm
@@ -36,11 +36,11 @@ TAP::Formatter::Console::Session - Harness output delegate for default console o
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Harness.pm
@@ -22,11 +22,11 @@ TAP::Harness - Run test scripts with statistics
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
$ENV{HARNESS_ACTIVE} = 1;
$ENV{HARNESS_VERSION} = $VERSION;
View
4 lib/TAP/Parser.pm
@@ -19,11 +19,11 @@ TAP::Parser - Parse L<TAP|Test::Harness::TAP> output
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
my $DEFAULT_TAP_VERSION = 12;
my $MAX_TAP_VERSION = 13;
View
7 lib/TAP/Parser/Aggregator.pm
@@ -10,11 +10,11 @@ TAP::Parser::Aggregator - Aggregate TAP::Parser results
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 SYNOPSIS
@@ -117,7 +117,8 @@ The C<$parser> is a L<TAP::Parser|TAP::Parser> object.
sub add {
my ( $self, $description, $parser ) = @_;
if ( exists $self->{parser_for}{$description} ) {
- $self->_croak("You already have a parser for ($description)");
+ $self->_croak( "You already have a parser for ($description)."
+ . " Perhaps you have run the same test twice." );
}
push @{ $self->{parse_order} } => $description;
$self->{parser_for}{$description} = $parser;
View
22 lib/TAP/Parser/Grammar.pm
@@ -12,11 +12,11 @@ TAP::Parser::Grammar - A grammar for the Test Anything Protocol.
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
@@ -73,6 +73,7 @@ my %language_for;
my ( $self, $line ) = @_;
my ( $tests_planned, $tail ) = ( $1, $2 );
my $explanation = undef;
+ my $skip = '';
if ( $tail =~ /^todo((?:\s+\d+)+)/ ) {
my @todo = split /\s+/, _trim($1);
@@ -81,19 +82,20 @@ my %language_for;
'', \@todo
);
}
- elsif ( $tail =~ /^#\s*SKIP\S*\s*(.*)\z/i ) {
- $explanation = $1;
+ elsif ( 0 == $tests_planned ) {
+ $skip = 'SKIP';
+ $explanation = $tail;
+ # Trim valid SKIP directive without being strict
+ # about its presence.
+ $explanation =~ s/^#\s*//;
+ $explanation =~ s/^skip\S*\s+//i;
}
elsif ( $tail !~ /^\s*$/ ) {
return $self->_make_unknown_token($line);
}
- my $skip
- = ( 0 == $tests_planned || defined $explanation )
- ? 'SKIP'
- : '';
-
$explanation = '' unless defined $explanation;
+
return $self->_make_plan_token(
$line, $tests_planned, $skip,
$explanation, []
@@ -114,7 +116,7 @@ my %language_for;
$line, $ok, $num,
$desc
);
- }
+ },
},
test => {
syntax => qr/^($ok) \s* ($num)? \s* (.*) \z/x,
View
4 lib/TAP/Parser/Iterator.pm
@@ -13,11 +13,11 @@ TAP::Parser::Iterator - Internal TAP::Parser Iterator
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 SYNOPSIS
View
4 lib/TAP/Parser/Iterator/Array.pm
@@ -11,11 +11,11 @@ TAP::Parser::Iterator::Array - Internal TAP::Parser Iterator
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 SYNOPSIS
View
4 lib/TAP/Parser/Iterator/Process.pm
@@ -19,11 +19,11 @@ TAP::Parser::Iterator::Process - Internal TAP::Parser Iterator
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 SYNOPSIS
View
4 lib/TAP/Parser/Iterator/Stream.pm
@@ -11,11 +11,11 @@ TAP::Parser::Iterator::Stream - Internal TAP::Parser Iterator
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 SYNOPSIS
View
4 lib/TAP/Parser/Multiplexer.pm
@@ -14,11 +14,11 @@ TAP::Parser::Multiplexer - Multiplex multiple TAP::Parsers
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 SYNOPSIS
View
4 lib/TAP/Parser/Result.pm
@@ -27,11 +27,11 @@ TAP::Parser::Result - TAP::Parser output
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head2 DESCRIPTION
View
4 lib/TAP/Parser/Result/Bailout.pm
@@ -12,11 +12,11 @@ TAP::Parser::Result::Bailout - Bailout result token.
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Parser/Result/Comment.pm
@@ -12,11 +12,11 @@ TAP::Parser::Result::Comment - Comment result token.
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Parser/Result/Plan.pm
@@ -12,11 +12,11 @@ TAP::Parser::Result::Plan - Plan result token.
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Parser/Result/Test.pm
@@ -14,11 +14,11 @@ TAP::Parser::Result::Test - Test result token.
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Parser/Result/Unknown.pm
@@ -14,11 +14,11 @@ TAP::Parser::Result::Unknown - Unknown result token.
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Parser/Result/Version.pm
@@ -12,11 +12,11 @@ TAP::Parser::Result::Version - TAP version result token.
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Parser/Result/YAML.pm
@@ -12,11 +12,11 @@ TAP::Parser::Result::YAML - YAML result token.
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Parser/Source.pm
@@ -14,11 +14,11 @@ TAP::Parser::Source - Stream output from some source
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Parser/Source/Perl.pm
@@ -16,11 +16,11 @@ TAP::Parser::Source::Perl - Stream Perl output
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
=head1 DESCRIPTION
View
4 lib/TAP/Parser/YAMLish/Reader.pm
@@ -4,7 +4,7 @@ use strict;
use vars qw{$VERSION};
-$VERSION = '2.99_10';
+$VERSION = '3.01';
# TODO:
# Handle blessed object syntax
@@ -277,7 +277,7 @@ TAP::Parser::YAMLish::Reader - Read YAMLish data from iterator
=head1 VERSION
-Version 2.99_10
+Version 3.01
=head1 SYNOPSIS
View
4 lib/TAP/Parser/YAMLish/Writer.pm
@@ -4,7 +4,7 @@ use strict;
use vars qw{$VERSION};
-$VERSION = '2.99_10';
+$VERSION = '3.01';
my $ESCAPE_CHAR = qr{ [ \x00-\x1f \" ] }x;
@@ -147,7 +147,7 @@ TAP::Parser::YAMLish::Writer - Write YAMLish data
=head1 VERSION
-Version 2.99_10
+Version 3.01
=head1 SYNOPSIS
View
4 lib/Test/Harness.pm
@@ -38,11 +38,11 @@ Test::Harness - Run Perl standard test scripts with statistics
=head1 VERSION
-Version 2.99_10
+Version 3.01
=cut
-$VERSION = '2.99_10';
+$VERSION = '3.01';
# Backwards compatibility for exportable variable names.
*verbose = *Verbose;
View
4 smoke/config.surly
@@ -1,12 +1,12 @@
---
global:
perls:
- # - interp: /home/andy/Works/Perl/versions/5.0.5-minimal/bin/perl
- # desc: vanilla install, no Test::More etc
- /home/andy/Works/Perl/versions/5.0.5/bin/perl
- /home/andy/Works/Perl/versions/5.6.1/bin/perl
- /home/andy/Works/Perl/versions/5.6.2/bin/perl
- /home/andy/Works/Perl/versions/5.8.5/bin/perl
+ - interp: /home/andy/Works/Perl/versions/RHEL4/bin/perl
+ desc: with RHEL4 @INC patch
- /home/andy/Works/Perl/versions/5.8.6/bin/perl
- /home/andy/Works/Perl/versions/5.8.7/bin/perl
- /usr/bin/perl
View
10 smoke/smoke.pl
@@ -15,7 +15,7 @@
use Sys::Hostname;
use YAML qw( DumpFile LoadFile );
-my $VERSION = 0.004;
+my $VERSION = 0.005;
# Reopen STDIN.
use IO::Pty;
@@ -197,8 +197,12 @@ sub test_and_report {
}
sub work_dir {
- my ( $task, $version ) = @_;
+ my ( $task, $version, $desc ) = @_;
my $name = $task->{name};
+ if ( defined $desc ) {
+ $desc =~ s/\W+/_/g;
+ $version = join( '_', $version, $desc );
+ }
return File::Spec->catdir(
$Config->{global}->{work}, $version,
split /::/, $name
@@ -225,7 +229,7 @@ sub expand {
sub test_against_perl {
my ( $version, $interp, $task, $rev, $desc ) = @_;
- my $work = work_dir( $task, $version );
+ my $work = work_dir( $task, $version, $desc );
rmtree($work) if -d $work;
mkpath($work);
View
16 t/compat/inc-propagation.t
@@ -6,7 +6,21 @@
use strict;
use lib 't/lib';
-use Test::More ( $^O eq 'VMS' ? ( skip_all => 'VMS' ) : ( tests => 2 ) );
+sub has_crazy_patch {
+ my $sentinel = 'blirpzoffle';
+ local $ENV{PERL5LIB} = $sentinel;
+ my $command = join ' ',
+ map {qq{"$_"}} ( $^X, '-e', 'print join q(:), @INC' );
+ my $path = `$command`;
+ my @got = ( $path =~ /($sentinel)/g );
+ return @got > 1;
+}
+
+use Test::More (
+ $^O eq 'VMS' ? ( skip_all => 'VMS' )
+ : has_crazy_patch() ? ( skip_all => 'Incompatible @INC patch' )
+ : ( tests => 2 )
+);
use Data::Dumper;
use Test::Harness;
View
6 t/prove.t
@@ -208,7 +208,7 @@ BEGIN { # START PLAN
},
runlog => [
[ '_runtests',
- { lib => mabs( ['blib/lib'] ),
+ { lib => mabs( [ 'blib/lib', 'blib/arch' ] ),
verbosity => 0
},
'TAP::Harness',
@@ -669,7 +669,7 @@ BEGIN { # START PLAN
expect => { blib => 1 },
runlog => [
[ '_runtests',
- { lib => mabs( ['blib/lib'] ),
+ { lib => mabs( [ 'blib/lib', 'blib/arch' ] ),
verbosity => 0
},
'TAP::Harness',
@@ -686,7 +686,7 @@ BEGIN { # START PLAN
expect => { blib => 1 },
runlog => [
[ '_runtests',
- { lib => mabs( ['blib/lib'] ),
+ { lib => mabs( [ 'blib/lib', 'blib/arch' ] ),
verbosity => 0
},
'TAP::Harness',
Please sign in to comment.
Something went wrong with that request. Please try again.