Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ooh, you're going to hate me for this. Checking in a *broken*

App::Prove::State.  Somehow, it's not saving the state, but I'm too tired to
figure out my stupidity right now.
  • Loading branch information...
commit 0a4effa486a3e3baf1a6515568d63b99006d5ed9 1 parent 945a1ca
@Ovid Ovid authored
View
323 META.yml
@@ -1,19 +1,6 @@
---
name: Test-Harness
version: 3.14
-
-
-
-
-
-
-
-
-
-
-
-
-
author:
- 'Andy Armstrong C<< <andy@hexten.net> >>'
abstract: Run Perl standard test scripts with statistics
@@ -31,312 +18,118 @@ recommends:
provides:
App::Prove:
file: lib/App/Prove.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
+ App::Prove::State:
+ file: lib/App/Prove/State.pm
+ version: 3.14
+ App::Prove::State::Result:
+ file: lib/App/Prove/State/Result.pm
+ version: 3.14
TAP::Base:
file: lib/TAP/Base.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Formatter::Color:
file: lib/TAP/Formatter/Color.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Formatter::Console:
file: lib/TAP/Formatter/Console.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Formatter::Console::ParallelSession:
file: lib/TAP/Formatter/Console/ParallelSession.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Formatter::Console::Session:
file: lib/TAP/Formatter/Console/Session.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Harness:
file: lib/TAP/Harness.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
+ TAP::Object:
+ file: lib/TAP/Object.pm
+ version: 3.14
TAP::Parser:
file: lib/TAP/Parser.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Aggregator:
file: lib/TAP/Parser/Aggregator.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Grammar:
file: lib/TAP/Parser/Grammar.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Iterator:
file: lib/TAP/Parser/Iterator.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Iterator::Array:
file: lib/TAP/Parser/Iterator/Array.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Iterator::Process:
file: lib/TAP/Parser/Iterator/Process.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Iterator::Stream:
file: lib/TAP/Parser/Iterator/Stream.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
+ TAP::Parser::IteratorFactory:
+ file: lib/TAP/Parser/IteratorFactory.pm
+ version: 3.14
TAP::Parser::Multiplexer:
file: lib/TAP/Parser/Multiplexer.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Result:
file: lib/TAP/Parser/Result.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Result::Bailout:
file: lib/TAP/Parser/Result/Bailout.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Result::Comment:
file: lib/TAP/Parser/Result/Comment.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Result::Plan:
file: lib/TAP/Parser/Result/Plan.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
+ TAP::Parser::Result::Pragma:
+ file: lib/TAP/Parser/Result/Pragma.pm
+ version: 3.14
TAP::Parser::Result::Test:
file: lib/TAP/Parser/Result/Test.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Result::Unknown:
file: lib/TAP/Parser/Result/Unknown.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Result::Version:
file: lib/TAP/Parser/Result/Version.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Result::YAML:
file: lib/TAP/Parser/Result/YAML.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
+ TAP::Parser::ResultFactory:
+ file: lib/TAP/Parser/ResultFactory.pm
+ version: 3.14
+ TAP::Parser::Scheduler:
+ file: lib/TAP/Parser/Scheduler.pm
+ version: 3.14
+ TAP::Parser::Scheduler::Job:
+ file: lib/TAP/Parser/Scheduler/Job.pm
+ version: 3.14
+ TAP::Parser::Scheduler::Spinner:
+ file: lib/TAP/Parser/Scheduler/Spinner.pm
+ version: 3.14
TAP::Parser::Source:
file: lib/TAP/Parser/Source.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::Source::Perl:
file: lib/TAP/Parser/Source/Perl.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
+ TAP::Parser::Utils:
+ file: lib/TAP/Parser/Utils.pm
+ version: 3.14
TAP::Parser::YAMLish::Reader:
file: lib/TAP/Parser/YAMLish/Reader.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
TAP::Parser::YAMLish::Writer:
file: lib/TAP/Parser/YAMLish/Writer.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
Test::Harness:
file: lib/Test/Harness.pm
- version: 3.11
-
-
-
-
-
-
-
-
+ version: 3.14
generated_by: Module::Build version 0.2808
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
View
1  lib/App/Prove.pm
@@ -470,6 +470,7 @@ sub _runtests {
$harness->callback(
after_test => sub {
+ $DB::single = 1;
$self->{_state}->observe_test(@_);
}
);
View
11 lib/App/Prove/State.pm
@@ -64,6 +64,7 @@ sub new {
seq => 1,
store => delete $args{store},
extension => delete $args{extension} || '.t',
+ test_num => 1,
}, $class;
my $store = $self->{store};
@@ -93,7 +94,7 @@ object.
=cut
-sub results { shift->{_} || App::Prove::State::Results->new }
+sub results { shift->{_} || App::Prove::State::Result->new }
sub DESTROY {
my $self = shift;
@@ -353,7 +354,6 @@ sub observe_test {
$self->_record_test(
$test, scalar( $parser->failed ) + ( $parser->has_problems ? 1 : 0 ),
scalar( $parser->todo ), $parser->start_time, $parser->end_time,
-
);
}
@@ -371,8 +371,9 @@ sub _record_test {
my ( $self, $test, $fail, $todo, $start_time, $end_time ) = @_;
my $rec = $self->results->tests->{ $test->[0] } ||= {};
- $rec->{seq} = $self->{seq}++;
- $rec->{gen} = $self->results->generation;
+ $rec->{test_num} = $self->{test_num}++;
+ $rec->{seq} = $self->{seq}++;
+ $rec->{gen} = $self->results->generation;
$rec->{last_run_time} = $end_time;
$rec->{last_result} = $fail;
@@ -400,7 +401,7 @@ sub save {
my $writer = TAP::Parser::YAMLish::Writer->new;
local *FH;
open FH, ">$name" or croak "Can't write $name ($!)";
- $writer->write( $self->results, \*FH );
+ $writer->write( $self->results->raw, \*FH );
close FH;
}
View
12 lib/App/Prove/State/Result.pm
@@ -98,4 +98,16 @@ Returns the number of tests for a given test suite result.
sub num_tests { keys %{ shift->{tests} } }
+=head3 C<raw>
+
+Returns a hashref of raw results, suitable for serialization by YAML.
+
+=cut
+
+sub raw {
+ my $self = shift;
+ my %raw = %$self;
+ return \%raw;
+}
+
1;
Please sign in to comment.
Something went wrong with that request. Please try again.