git-svn: factor out svnserve test code for later use
Signed-off-by: Alec Berryman <alec@thened.net> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alec Berryman committed
Sep 14, 2008 at 17:14 UTC
dd9da51fe261f723d206fdd5e4874c25937d1b87
2 files changed
+18
-13
t/lib-git-svn.sh
+17
@@ -135,3 +135,20 @@ close $wr or die $!;
135
close $rd or die $!;
136
EOF
137
}
138
+
139
+require_svnserve () {
140
+ if test -z "$SVNSERVE_PORT"
141
+ then
142
+ say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
143
+ test_done
144
+ exit
145
+ fi
146
+}
147
+
148
+start_svnserve () {
149
+ svnserve --listen-port $SVNSERVE_PORT \
150
+ --root "$rawsvnrepo" \
151
+ --listen-once \
152
+ --listen-host 127.0.0.1 &
153
+}
154
+
t/t9113-git-svn-dcommit-new-file.sh
+1
-13
@@ -12,19 +12,7 @@ test_description='git-svn dcommit new files over svn:// test'
12
13
. ./lib-git-svn.sh
14
15
-if test -z "$SVNSERVE_PORT"
16
-then
17
- say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
18
- test_done
19
- exit
20
-fi
21
-
22
-start_svnserve () {
23
- svnserve --listen-port $SVNSERVE_PORT \
24
- --root "$rawsvnrepo" \
25
- --listen-once \
26
- --listen-host 127.0.0.1 &
27
-}
15
+require_svnserve
16
17
test_expect_success 'start tracking an empty repo' '
18
svn mkdir -m "empty dir" "$svnrepo"/empty-dir &&