Skip to content

Commit 0316bba

Browse files
jrngitster
authored andcommitted
t9010: svnadmin can fail even if available
If svn is built against one version of SQLite and run against another, libsvn_subr needlessly errors out in operations that need to make a commit. That is clearly not a bug in git but let us consider the ramifications for the test suite. git-svn uses libsvn directly and is probably broken by that bug; it is right for git-svn tests to fail. The vcs-svn lib, on the other hand, does not use libsvn and the test t9010 only uses svn to check its work. This points to two possible improvements: - do not disable most vcs-svn tests if svn is missing. - skip validation rather than failing it when svn fails. Bring about both by putting the svn invocations into a single test that builds a repo to compare the test-svn-fe result against. The test will always pass but only will set the new SVNREPO test prereq if svn succeeds; and validation using that repo gets an SVNREPO prerequisite so it only runs with working svn installations. Works-around: http://bugs.debian.org/608925 Noticed-by: A Large Angry SCM <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]>
1 parent bf9b46c commit 0316bba

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

t/t9010-svn-fe.sh

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,6 @@ test_description='check svn dumpfile importer'
44

55
. ./test-lib.sh
66

7-
if ! svnadmin -h >/dev/null 2>&1
8-
then
9-
skip_all='skipping svn-fe tests, svn not available'
10-
test_done
11-
fi
12-
13-
svnconf=$PWD/svnconf
14-
export svnconf
15-
16-
svn_cmd () {
17-
subcommand=$1 &&
18-
shift &&
19-
mkdir -p "$svnconf" &&
20-
svn "$subcommand" --config-dir "$svnconf" "$@"
21-
}
22-
237
reinit_git () {
248
rm -fr .git &&
259
git init
@@ -41,10 +25,21 @@ test_expect_success 'v3 dumps not supported' '
4125
test_cmp empty stream
4226
'
4327

44-
test_expect_success 't9135/svn.dump' '
45-
svnadmin create simple-svn &&
46-
svnadmin load simple-svn <"$TEST_DIRECTORY/t9135/svn.dump" &&
47-
svn_cmd export "file://$PWD/simple-svn" simple-svnco &&
28+
test_expect_success 'set up svn repo' '
29+
svnconf=$PWD/svnconf &&
30+
mkdir -p "$svnconf" &&
31+
32+
if
33+
svnadmin -h >/dev/null 2>&1 &&
34+
svnadmin create simple-svn &&
35+
svnadmin load simple-svn <"$TEST_DIRECTORY/t9135/svn.dump" &&
36+
svn export --config-dir "$svnconf" "file://$PWD/simple-svn" simple-svnco
37+
then
38+
test_set_prereq SVNREPO
39+
fi
40+
'
41+
42+
test_expect_success SVNREPO 't9135/svn.dump' '
4843
git init simple-git &&
4944
test-svn-fe "$TEST_DIRECTORY/t9135/svn.dump" >simple.fe &&
5045
(

0 commit comments

Comments
 (0)