Skip to content

Commit dd9da51

Browse files
alecgitster
authored andcommitted
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>
1 parent 903e09a commit dd9da51

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

t/lib-git-svn.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,20 @@ close $wr or die $!;
135135
close $rd or die $!;
136136
EOF
137137
}
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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,7 @@ test_description='git-svn dcommit new files over svn:// test'
1212

1313
. ./lib-git-svn.sh
1414

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
2816

2917
test_expect_success 'start tracking an empty repo' '
3018
svn mkdir -m "empty dir" "$svnrepo"/empty-dir &&

0 commit comments

Comments
 (0)