[Catalyst-commits] r8941 - in Catalyst-Runtime/5.80/trunk/t: .
lib/TestApp/Controller
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Wed Dec 24 14:30:25 GMT 2008
Author: rafl
Date: 2008-12-24 14:30:25 +0000 (Wed, 24 Dec 2008)
New Revision: 8941
Modified:
Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Fork.pm
Catalyst-Runtime/5.80/trunk/t/live_fork.t
Catalyst-Runtime/5.80/trunk/t/optional_memleak.t
Catalyst-Runtime/5.80/trunk/t/optional_stress.t
Log:
Make the test suites YAML dependency optional.
Modified: Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Fork.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Fork.pm 2008-12-24 10:16:12 UTC (rev 8940)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Fork.pm 2008-12-24 14:30:25 UTC (rev 8941)
@@ -7,8 +7,9 @@
use strict;
use warnings;
use base 'Catalyst::Controller';
-use YAML;
+eval 'use YAML';
+
sub system : Local {
my ($self, $c, $ls) = @_;
my ($result, $code) = (undef, 1);
Modified: Catalyst-Runtime/5.80/trunk/t/live_fork.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/live_fork.t 2008-12-24 10:16:12 UTC (rev 8940)
+++ Catalyst-Runtime/5.80/trunk/t/live_fork.t 2008-12-24 14:30:25 UTC (rev 8941)
@@ -10,11 +10,13 @@
use strict;
use warnings;
use Test::More;
-use YAML;
use FindBin;
use lib "$FindBin::Bin/lib";
use Catalyst::Test qw(TestApp);
+eval 'use YAML';
+plan skip_all => 'YAML required' if $@;
+
plan skip_all => 'Using remote server'
if $ENV{CATALYST_SERVER};
Modified: Catalyst-Runtime/5.80/trunk/t/optional_memleak.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/optional_memleak.t 2008-12-24 10:16:12 UTC (rev 8940)
+++ Catalyst-Runtime/5.80/trunk/t/optional_memleak.t 2008-12-24 14:30:25 UTC (rev 8941)
@@ -8,16 +8,19 @@
use Test::More;
use Catalyst::Test 'TestApp';
-use YAML;
-eval "use Proc::ProcessTable";
plan skip_all => 'set TEST_MEMLEAK to enable this test'
unless $ENV{TEST_MEMLEAK};
+
+eval "use Proc::ProcessTable";
plan skip_all => 'Proc::ProcessTable required for this test' if $@;
eval "use HTTP::Body 0.03";
plan skip_all => 'HTTP::Body >= 0.03 required for this test' if $@;
+eval "use YAML";
+plan skip_all => 'YAML required for this test' if $@;
+
our $t = Proc::ProcessTable->new( cache_ttys => 1 );
our ( $initial, $final ) = ( 0, 0 );
our $tests = YAML::LoadFile("$FindBin::Bin/optional_stress.yml");
Modified: Catalyst-Runtime/5.80/trunk/t/optional_stress.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/optional_stress.t 2008-12-24 10:16:12 UTC (rev 8940)
+++ Catalyst-Runtime/5.80/trunk/t/optional_stress.t 2008-12-24 14:30:25 UTC (rev 8941)
@@ -8,7 +8,6 @@
use Test::More;
use Catalyst::Test 'TestApp';
-use YAML;
our ( $iters, $tests );
@@ -16,6 +15,9 @@
plan skip_all => 'set TEST_STRESS to enable this test'
unless $ENV{TEST_STRESS};
+ eval "use YAML";
+ plan skip_all => 'YAML is required for this test' if $@;
+
$iters = $ENV{TEST_STRESS} || 10;
$tests = YAML::LoadFile("$FindBin::Bin/optional_stress.yml");
More information about the Catalyst-commits
mailing list