[PATCH] git-svn: factor out svnserve test code for later use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alec Berryman <alec@xxxxxxxxxx>
---
 t/lib-git-svn.sh                    |   17 +++++++++++++++++
 t/t9113-git-svn-dcommit-new-file.sh |   14 +-------------
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index c526eed..67c431d 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -138,3 +138,20 @@ close $wr or die $!;
 close $rd or die $!;
 EOF
 }
+
+require_svnserve () {
+    if test -z "$SVNSERVE_PORT"
+    then
+        say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
+        test_done
+        exit
+    fi
+}
+
+start_svnserve () {
+    svnserve --listen-port $SVNSERVE_PORT \
+             --root "$rawsvnrepo" \
+             --listen-once \
+             --listen-host 127.0.0.1 &
+}
+
diff --git a/t/t9113-git-svn-dcommit-new-file.sh b/t/t9113-git-svn-dcommit-new-file.sh
index 250c530..e9b6128 100755
--- a/t/t9113-git-svn-dcommit-new-file.sh
+++ b/t/t9113-git-svn-dcommit-new-file.sh
@@ -12,19 +12,7 @@ test_description='git svn dcommit new files over svn:// test'
 
 . ./lib-git-svn.sh
 
-if test -z "$SVNSERVE_PORT"
-then
-	say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
-	test_done
-	exit
-fi
-
-start_svnserve () {
-	svnserve --listen-port $SVNSERVE_PORT \
-	         --root "$rawsvnrepo" \
-	         --listen-once \
-	         --listen-host 127.0.0.1 &
-}
+require_svnserve
 
 test_expect_success 'start tracking an empty repo' '
 	svn mkdir -m "empty dir" "$svnrepo"/empty-dir &&
-- 
1.6.0.2.231.gfc858

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux