[Catalyst-commits] r8746 - Catalyst-Runtime/5.80/trunk/t
marcus at dev.catalyst.perl.org
marcus at dev.catalyst.perl.org
Fri Dec 5 09:55:51 GMT 2008
Author: marcus
Date: 2008-12-05 09:55:51 +0000 (Fri, 05 Dec 2008)
New Revision: 8746
Modified:
Catalyst-Runtime/5.80/trunk/t/optional_http-server-restart.t
Catalyst-Runtime/5.80/trunk/t/optional_http-server.t
Catalyst-Runtime/5.80/trunk/t/optional_lighttpd-fastcgi-non-root.t
Catalyst-Runtime/5.80/trunk/t/optional_lighttpd-fastcgi.t
Log:
Update test suite to find right perl
Modified: Catalyst-Runtime/5.80/trunk/t/optional_http-server-restart.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/optional_http-server-restart.t 2008-12-05 09:03:19 UTC (rev 8745)
+++ Catalyst-Runtime/5.80/trunk/t/optional_http-server-restart.t 2008-12-05 09:55:51 UTC (rev 8746)
@@ -29,7 +29,7 @@
mkdir $tmpdir;
chdir $tmpdir;
-system( 'perl', "-I$FindBin::Bin/../lib", "$FindBin::Bin/../script/catalyst.pl", 'TestApp' );
+system( $^X, "-I$FindBin::Bin/../lib", "$FindBin::Bin/../script/catalyst.pl", 'TestApp' );
chdir "$FindBin::Bin/..";
File::Copy::Recursive::dircopy( 't/lib', 't/tmp/TestApp/lib' );
@@ -42,7 +42,7 @@
my( $server, $pid );
$pid = open3( undef, $server, undef,
- 'perl', "-I$FindBin::Bin/../lib",
+ $^X, "-I$FindBin::Bin/../lib",
"$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl", '-port',
$port, '-restart' )
or die "Unable to spawn standalone HTTP server: $!";
@@ -173,7 +173,7 @@
} qw/Action Engine/;
$pid = open3( undef, $server, undef,
- 'perl', "-I$FindBin::Bin/../lib",
+ $^X, "-I$FindBin::Bin/../lib",
"$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl", '-port',
$port, '-restart', $restartdirs )
or die "Unable to spawn standalone HTTP server: $!";
Modified: Catalyst-Runtime/5.80/trunk/t/optional_http-server.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/optional_http-server.t 2008-12-05 09:03:19 UTC (rev 8745)
+++ Catalyst-Runtime/5.80/trunk/t/optional_http-server.t 2008-12-05 09:55:51 UTC (rev 8746)
@@ -25,7 +25,7 @@
# create a TestApp and copy the test libs into it
mkdir $tmpdir;
chdir $tmpdir;
-system( 'perl', "-I$FindBin::Bin/../lib", "$FindBin::Bin/../script/catalyst.pl", 'TestApp' );
+system( $^X, "-I$FindBin::Bin/../lib", "$FindBin::Bin/../script/catalyst.pl", 'TestApp' );
chdir "$FindBin::Bin/..";
File::Copy::Recursive::dircopy( 't/lib', 't/tmp/TestApp/lib' );
@@ -35,7 +35,7 @@
# spawn the standalone HTTP server
my $port = 30000 + int rand(1 + 10000);
my $pid = open3( undef, my $server, undef,
- 'perl', "-I$FindBin::Bin/../lib",
+ $^X, "-I$FindBin::Bin/../lib",
"$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl", '-port', $port )
or die "Unable to spawn standalone HTTP server: $!";
@@ -50,10 +50,10 @@
my $return;
if ( $single_test ) {
- $return = system( "perl -Ilib/ $single_test" );
+ $return = system( "$^X -Ilib/ $single_test" );
}
else {
- $return = system( 'prove -r -Ilib/ t/live_*.t' );
+ $return = prove( '-r', '-Ilib/', glob('t/live_*.t') );
}
# shut it down
@@ -81,3 +81,15 @@
return 0;
}
}
+
+sub prove {
+ if (!(my $pid = fork)) {
+ require App::Prove;
+ my $prove = App::Prove->new;
+ $prove->process_args(@_);
+ exit( $prove->run ? 0 : 1 );
+ } else {
+ waitpid $pid, 0;
+ return $?;
+ }
+}
Modified: Catalyst-Runtime/5.80/trunk/t/optional_lighttpd-fastcgi-non-root.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/optional_lighttpd-fastcgi-non-root.t 2008-12-05 09:03:19 UTC (rev 8745)
+++ Catalyst-Runtime/5.80/trunk/t/optional_lighttpd-fastcgi-non-root.t 2008-12-05 09:55:51 UTC (rev 8746)
@@ -37,7 +37,7 @@
# create a TestApp and copy the test libs into it
mkdir "$FindBin::Bin/../t/tmp";
chdir "$FindBin::Bin/../t/tmp";
-system "perl -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl TestApp";
+system "$^X -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl TestApp";
chdir "$FindBin::Bin/..";
File::Copy::Recursive::dircopy( 't/lib', 't/tmp/TestApp/lib' );
Modified: Catalyst-Runtime/5.80/trunk/t/optional_lighttpd-fastcgi.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/optional_lighttpd-fastcgi.t 2008-12-05 09:03:19 UTC (rev 8745)
+++ Catalyst-Runtime/5.80/trunk/t/optional_lighttpd-fastcgi.t 2008-12-05 09:55:51 UTC (rev 8746)
@@ -37,7 +37,7 @@
# create a TestApp and copy the test libs into it
mkdir "$FindBin::Bin/../t/tmp";
chdir "$FindBin::Bin/../t/tmp";
-system "perl -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl TestApp";
+system "$^X -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl TestApp";
chdir "$FindBin::Bin/..";
File::Copy::Recursive::dircopy( 't/lib', 't/tmp/TestApp/lib' );
More information about the Catalyst-commits
mailing list