[Bps-public-commit] r17763 - in Shipwright/trunk: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Jan 16 04:08:41 EST 2009


Author: sunnavy
Date: Fri Jan 16 04:08:41 2009
New Revision: 17763

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Test.pm

Log:
 r18808 at sunnavys-mb:  sunnavy | 2009-01-16 15:50:55 +0800
 add skip_svn and skip_svk in Test.pm


Modified: Shipwright/trunk/lib/Shipwright/Test.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Test.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Test.pm	Fri Jan 16 04:08:41 2009
@@ -11,7 +11,7 @@
 use Shipwright::Util;
 
 our @EXPORT =
-  qw/has_svk has_svn create_fs_repo create_svk_repo create_svn_repo devel_cover_enabled test_cmd/;
+  qw/has_svk has_svn skip_svk skip_svn create_fs_repo create_svk_repo create_svn_repo devel_cover_enabled test_cmd/;
 
 =head1 NAME
 
@@ -55,6 +55,34 @@
     return;
 }
 
+=head2 skip_svn
+
+if skip svn when test.
+skip test svn unless env SHIPWRIGHT_TEST_BACKEND_SVN is set to true and
+the system has svn
+
+=cut
+
+sub skip_svn {
+    return 1 unless $ENV{'SHIPWRIGHT_TEST_BACKEND_SVN'};
+    return unless has_svn();
+    return 1;
+}
+
+=head2 skip_svk
+
+if skip svk when test.
+skip test svk unless env SHIPWRIGHT_TEST_BACKEND_SVK is set to true and
+the system has svk
+
+=cut
+
+sub skip_svk {
+    return 1 unless $ENV{'SHIPWRIGHT_TEST_BACKEND_SVK'};
+    return unless has_svk();
+    return 1;
+}
+
 =head2 create_fs_repo 
 
 create a repo for fs



More information about the Bps-public-commit mailing list