--- trunk/lib/Frey/Test/Runner.pm 2008/11/24 18:10:34 490 +++ trunk/lib/Frey/Test/Runner.pm 2008/11/24 18:29:41 491 @@ -27,38 +27,41 @@ my ($self) = @_; my $f = TAP::Formatter::HTML->new({ - silent => 1, +# silent => 1, inline_css => 1, - inline_js => 1, + inline_js => 0, }); my $h = TAP::Harness->new({ merge => 1, formatter => $f, }); - my @tests = - grep { ! m{$0} } # FIXME privitive way to break recursion - grep { m{\.t$} } # take just tests - map { - if ( m{(.+)\.pm$} ) { - my $class = $1; - $class =~ s{^lib/}{}; - $class =~ s{/}{::}g; - warn "extract $_ tests $class"; - Frey::PPI->new( class => $class )->has_tests; - } else { - $_ - } + my $tests; + + map { + $tests->{$_}++ if m{\.t$}; + } @{ $self->tests }; + + map { + if ( m{(.+)\.pm$} ) { + my $class = $1; + $class =~ s{^lib/}{}; + $class =~ s{/}{::}g; + warn "extract tests from $_ class $class"; + $tests->{$_}++ foreach Frey::PPI->new( class => $class )->has_tests; } - @{ $self->tests }; + } @{ $self->tests }; - die "no tests for files ", dump( $self->tests ) unless @tests; + my @tests = grep { + ! m{$0} # break recursion + } sort keys %$tests; + die "no tests for files ", dump( $self->tests ),dump( $tests ) unless @tests; warn "testing ",dump( @tests ); $h->runtests( @tests ); - $self->store( 'var/test.yaml', $h ); + $self->store( 'var/test/' . time() . '.yaml', $h ); my $html = ${ $f->html }; # warn $html;