[Jifty-commit] r7617 - in jifty/trunk: lib/Jifty

Jifty commits jifty-commit at lists.jifty.org
Mon Nov 16 19:57:20 EST 2009


Author: sartak
Date: Mon Nov 16 19:57:20 2009
New Revision: 7617

Modified:
   jifty/trunk/META.yml
   jifty/trunk/Makefile.PL
   jifty/trunk/lib/Jifty/Test.pm
   jifty/trunk/lib/Jifty/TestServer.pm

Log:
Use Test::Script::Run's get_perl_cmd instead of reinventing it

Modified: jifty/trunk/META.yml
==============================================================================
--- jifty/trunk/META.yml	(original)
+++ jifty/trunk/META.yml	Mon Nov 16 19:57:20 2009
@@ -119,6 +119,7 @@
   Test::LongString: 0
   Test::More: 0.62
   Test::Pod::Coverage: 0
+  Test::Script::Run: 0.03
   Test::WWW::Mechanize: 1.04
   Test::WWW::Selenium: 1.18
   UNIVERSAL::require: 0

Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL	(original)
+++ jifty/trunk/Makefile.PL	Mon Nov 16 19:57:20 2009
@@ -78,6 +78,7 @@
 requires('Test::LongString');
 requires('Test::More' => 0.62 );
 requires('Test::Pod::Coverage');
+requires('Test::Script::Run' => 0.03);
 requires('Test::WWW::Mechanize' => 1.04 );
 requires('Test::WWW::Selenium' => 1.18 );
 requires('WWW::Mechanize' => 1.51 );

Modified: jifty/trunk/lib/Jifty/Test.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Test.pm	(original)
+++ jifty/trunk/lib/Jifty/Test.pm	Mon Nov 16 19:57:20 2009
@@ -639,7 +639,6 @@
     return $result;
 }
 
-
 # Stick the END block in a method so we can test it.
 END { Jifty::Test->_ending }
 

Modified: jifty/trunk/lib/Jifty/TestServer.pm
==============================================================================
--- jifty/trunk/lib/Jifty/TestServer.pm	(original)
+++ jifty/trunk/lib/Jifty/TestServer.pm	Mon Nov 16 19:57:20 2009
@@ -4,11 +4,7 @@
 use warnings;
 use File::Spec;
 use Test::Builder;
-
-# explicitly ignore ClassLoader objects in @INC,
-# which'd be ignored in the end, though.
-my $INC = [grep { defined } map { File::Spec->rel2abs($_) } grep { !ref } @INC ];
-my @perl = ($^X, map { "-I$_" } @$INC);
+use Test::Script::Run 'get_perl_cmd';
 
 =head1 NAME
 
@@ -82,7 +78,7 @@
         push @extra, '-MDevel::Cover'.($coverage =~ m/,/ ? "=$coverage" : '');
     }
 
-    exec(@perl, @extra, '-MJifty::Util', '-MJifty::Script',
+    exec(get_perl_cmd(), @extra, '-MJifty::Util', '-MJifty::Script',
          '-e', 'Jifty::Script->dispatch', 'server', '--quiet',
          '--sigready', 'USR1',
          $ENV{JIFTY_TESTSERVER_DBIPROF} ? ('--dbiprof') : (),
@@ -91,7 +87,7 @@
 
 sub DESTROY {
     return unless $_[0]->{started};
-    exec(@perl, 'bin/jifty', 'server', '--stop');
+    exec(get_perl_cmd('jifty'), 'server', '--stop');
 }
 
 1;


More information about the Jifty-commit mailing list