[Bps-public-commit] r17765 - in Shipwright/trunk: t t/hello

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Jan 16 04:09:12 EST 2009


Author: sunnavy
Date: Fri Jan 16 04:09:11 2009
New Revision: 17765

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/t/01.repo_check.t
   Shipwright/trunk/t/07.script.t
   Shipwright/trunk/t/10.flags.t
   Shipwright/trunk/t/21.perl_in_build.t
   Shipwright/trunk/t/71.script_cmds.t
   Shipwright/trunk/t/hello/svk.t
   Shipwright/trunk/t/hello/svn.t

Log:
 r18810 at sunnavys-mb:  sunnavy | 2009-01-16 16:07:07 +0800
 use skip_svk and skip_svn in tests, so we can skip svk and svn backends tests by default: they are too time consuming


Modified: Shipwright/trunk/t/01.repo_check.t
==============================================================================
--- Shipwright/trunk/t/01.repo_check.t	(original)
+++ Shipwright/trunk/t/01.repo_check.t	Fri Jan 16 04:09:11 2009
@@ -2,7 +2,7 @@
 use warnings;
 
 use Shipwright;
-use Shipwright::Test qw/has_svk create_svk_repo has_svn create_svn_repo/;
+use Shipwright::Test qw/skip_svk create_svk_repo skip_svn create_svn_repo/;
 use File::Spec::Functions qw/catfile/;
 use File::Temp qw/tempdir/;
 
@@ -11,8 +11,10 @@
 Shipwright::Test->init;
 
 SKIP: {
-    skip "no svk found", 5
-      unless has_svk();
+    skip
+"svk: no svk found or env SHIPWRIGHT_TEST_BACKEND_SVK not set",
+      5
+      if skip_svk();
 
     create_svk_repo();
 
@@ -46,8 +48,8 @@
 }
 
 SKIP: {
-    skip "no svn found", 5
-      unless has_svn();
+    skip "svn: no svn found or env SHIPWRIGHT_TEST_BACKEND_SVN not set", 5
+      if skip_svn();
 
     my $valid   = create_svn_repo();
     my $invalid = 'svn:file:///aa/bb/cc';

Modified: Shipwright/trunk/t/07.script.t
==============================================================================
--- Shipwright/trunk/t/07.script.t	(original)
+++ Shipwright/trunk/t/07.script.t	Fri Jan 16 04:09:11 2009
@@ -50,7 +50,7 @@
     for my $v ( @{ $wrong_argv{$msg} } ) {
         if ( $v->[2] && $v->[2] =~ /^svn/ ) {
           SKIP: {
-                skip 'no svn found', 1 unless has_svn;
+                skip 'svn: no svn found or env SHIPWRIGHT_TEST_BACKEND_SVN not set', 1 if skip_svn;
                 eval { @ARGV = @$v; Shipwright::Script->prepare };
                 like( $@, qr/$msg/, $msg );
             }

Modified: Shipwright/trunk/t/10.flags.t
==============================================================================
--- Shipwright/trunk/t/10.flags.t	(original)
+++ Shipwright/trunk/t/10.flags.t	Fri Jan 16 04:09:11 2009
@@ -2,7 +2,7 @@
 use warnings;
 
 use Shipwright;
-use Shipwright::Test qw/has_svk create_svk_repo has_svn create_svn_repo/;
+use Shipwright::Test qw/skip_svk create_svk_repo skip_svn create_svn_repo/;
 use File::Spec::Functions qw/catfile catdir/;
 
 use Test::More tests => 6;
@@ -10,8 +10,8 @@
 Shipwright::Test->init;
 
 SKIP: {
-    skip "no svk and svnadmin found", 3
-      unless has_svk();
+    skip "svk: no svk found or env SHIPWRIGHT_TEST_BACKEND_SVK not set", 3
+      if skip_svk();
 
     create_svk_repo();
     my $repo = '//__shipwright/foo';
@@ -26,8 +26,8 @@
 }
 
 SKIP: {
-    skip "no svn and svnadmin found", 3
-      unless has_svn();
+    skip "svn: no svn found or env SHIPWRIGHT_TEST_BACKEND_SVN not set", 3
+      if skip_svn();
 
     my $repo = create_svn_repo . '/foo';
 

Modified: Shipwright/trunk/t/21.perl_in_build.t
==============================================================================
--- Shipwright/trunk/t/21.perl_in_build.t	(original)
+++ Shipwright/trunk/t/21.perl_in_build.t	Fri Jan 16 04:09:11 2009
@@ -2,7 +2,7 @@
 use warnings;
 
 use Shipwright;
-use Shipwright::Test qw/has_svk create_svk_repo has_svn create_svn_repo/;
+use Shipwright::Test qw/skip_svk create_svk_repo skip_svn create_svn_repo/;
 use File::Spec::Functions qw/catfile catdir/;
 use File::Temp qw/tempdir/;
 
@@ -10,8 +10,8 @@
 Shipwright::Test->init;
 
 SKIP: {
-    skip "no svk and svnadmin found", 8
-      unless has_svk();
+    skip "svk: no svk found or env SHIPWRIGHT_TEST_BACKEND_SVK not set", 8
+      if skip_svk();
 
     create_svk_repo();
 

Modified: Shipwright/trunk/t/71.script_cmds.t
==============================================================================
--- Shipwright/trunk/t/71.script_cmds.t	(original)
+++ Shipwright/trunk/t/71.script_cmds.t	Fri Jan 16 04:09:11 2009
@@ -18,7 +18,7 @@
 start_test($repo);
 
 SKIP: {
-    skip "no svn found", 36 unless has_svn();
+    skip "svn: no svn found or env SHIPWRIGHT_TEST_BACKEND_SVN not set", 36 if skip_svn();
 
     my $repo = 'svn:' . create_svn_repo() . '/hello';
 
@@ -34,7 +34,7 @@
 }
 
 SKIP: {
-    skip "no svk and svnadmin found", 36 unless has_svk();
+    skip "svk: no svk found or env SHIPWRIGHT_TEST_BACKEND_SVK not set", 36 if skip_svk();
 
     create_svk_repo();
 

Modified: Shipwright/trunk/t/hello/svk.t
==============================================================================
--- Shipwright/trunk/t/hello/svk.t	(original)
+++ Shipwright/trunk/t/hello/svk.t	Fri Jan 16 04:09:11 2009
@@ -10,12 +10,12 @@
 use Cwd qw/getcwd abs_path/;
 
 use Test::More tests => 41;
-use Shipwright::Test qw/has_svk create_svk_repo/;
+use Shipwright::Test qw/skip_svk create_svk_repo/;
 Shipwright::Test->init;
 
 SKIP: {
-    skip "no svk and svnadmin found", Test::More->builder->expected_tests
-      unless has_svk();
+    skip "svk: no svk found or env SHIPWRIGHT_TEST_BACKEND_SVK not set", Test::More->builder->expected_tests
+      if skip_svk();
 
     my $cwd = getcwd;
 

Modified: Shipwright/trunk/t/hello/svn.t
==============================================================================
--- Shipwright/trunk/t/hello/svn.t	(original)
+++ Shipwright/trunk/t/hello/svn.t	Fri Jan 16 04:09:11 2009
@@ -8,13 +8,13 @@
 use File::Spec::Functions qw/catfile catdir updir/;
 use Cwd qw/getcwd abs_path/;
 use Test::More tests => 17;
-use Shipwright::Test qw/has_svn create_svn_repo/;
+use Shipwright::Test qw/skip_svn create_svn_repo/;
 use File::Path qw/rmtree/;
 Shipwright::Test->init;
 
 SKIP: {
-    skip "no svn found", Test::More->builder->expected_tests
-      unless has_svn();
+    skip "svn: no svn found or env SHIPWRIGHT_TEST_BACKEND_SVN not set", Test::More->builder->expected_tests
+      if skip_svn();
 
     my $cwd = getcwd;
 



More information about the Bps-public-commit mailing list