[Catalyst-commits] r13758 - in Catalyst-Runtime/5.80/branches/psgi:
. t t/author
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sat Dec 4 21:40:15 GMT 2010
Author: rafl
Date: 2010-12-04 21:40:14 +0000 (Sat, 04 Dec 2010)
New Revision: 13758
Modified:
Catalyst-Runtime/5.80/branches/psgi/Makefile.PL
Catalyst-Runtime/5.80/branches/psgi/t/aggregate.t
Catalyst-Runtime/5.80/branches/psgi/t/author/http-server.t
Log:
Merge branch 'master' into psgi
* master:
Stop passing along @INC
Use the proper way of setting @INC for tests
Aggregate http-server.t tests
Allow aggregating specific tests only
Use the harness instead of all of prove
Make the no-tabs test happy again
Modified: Catalyst-Runtime/5.80/branches/psgi/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/Makefile.PL 2010-12-04 21:19:46 UTC (rev 13757)
+++ Catalyst-Runtime/5.80/branches/psgi/Makefile.PL 2010-12-04 21:40:14 UTC (rev 13758)
@@ -63,11 +63,13 @@
test_requires 'Data::Dump';
# aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available
-if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.35_05')) {
- author_requires('Test::Aggregate', '0.35_05');
+if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.364')) {
+ author_requires('Test::Aggregate', '0.364');
author_requires('Test::Simple', '0.88');
+ open my $fh, '>', '.aggregating';
}
else {
+ unlink '.aggregating';
tests join q{ },
grep { $_ ne 't/aggregate.t' }
map { glob } qw[t/*.t t/aggregate/*.t];
Modified: Catalyst-Runtime/5.80/branches/psgi/t/aggregate.t
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/t/aggregate.t 2010-12-04 21:19:46 UTC (rev 13757)
+++ Catalyst-Runtime/5.80/branches/psgi/t/aggregate.t 2010-12-04 21:40:14 UTC (rev 13758)
@@ -7,14 +7,14 @@
use lib "$FindBin::Bin/lib";
BEGIN {
- unless (eval { require Test::Aggregate; Test::Aggregate->VERSION('0.35_05'); 1 }) {
+ unless (eval { require Test::Aggregate; Test::Aggregate->VERSION('0.364'); 1 }) {
require Test::More;
- Test::More::plan(skip_all => 'Test::Aggregate 0.35_05 required for test aggregation');
+ Test::More::plan(skip_all => 'Test::Aggregate 0.364 required for test aggregation');
}
}
my $tests = Test::Aggregate->new({
- dirs => 't/aggregate',
+ (@ARGV ? (tests => \@ARGV) : (dirs => 't/aggregate')),
verbose => 0,
set_filenames => 1,
findbin => 1,
Modified: Catalyst-Runtime/5.80/branches/psgi/t/author/http-server.t
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/t/author/http-server.t 2010-12-04 21:19:46 UTC (rev 13757)
+++ Catalyst-Runtime/5.80/branches/psgi/t/author/http-server.t 2010-12-04 21:40:14 UTC (rev 13758)
@@ -49,12 +49,14 @@
# run the testsuite against the HTTP server
$ENV{CATALYST_SERVER} = "http://localhost:$port";
+chdir '..';
+
my $return;
if ( $single_test ) {
- $return = system( "$^X -I../lib/ $single_test" );
+ $return = system( "$^X -Ilib/ $single_test" );
}
else {
- $return = prove( '-r', '-I../lib/', glob('../t/aggregate/live_*.t') );
+ $return = prove(grep { $_ ne '..' } glob('t/aggregate/live_*.t'));
}
# shut it down
@@ -84,11 +86,21 @@
}
sub prove {
+ my (@tests) = @_;
if (!(my $pid = fork)) {
- require App::Prove;
- my $prove = App::Prove->new;
- $prove->process_args(@_);
- exit( $prove->run ? 0 : 1 );
+ require TAP::Harness;
+
+ my $aggr = -e '.aggregating';
+ my $harness = TAP::Harness->new({
+ ($aggr ? (test_args => \@tests) : ()),
+ lib => ['lib'],
+ });
+
+ my $aggregator = $aggr
+ ? $harness->runtests('t/aggregate.t')
+ : $harness->runtests(@tests);
+
+ exit $aggregator->has_errors ? 1 : 0;
} else {
waitpid $pid, 0;
return $?;
More information about the Catalyst-commits
mailing list