@matheusbsbs / matheus-bagliano / commits / 0316bba80f
Fork 0

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 <gitzilla@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>

Jonathan Nieder committed Jan 6, 2011 at 12:00 UTC 0316bba80f496100ec1706f8d9feb071f20d100c
1 file changed +15 -20
t/t9010-svn-fe.sh
+15 -20
@@ -4,22 +4,6 @@ test_description='check svn dumpfile importer'
4
5 . ./test-lib.sh
6
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 -
7 reinit_git () {
8 rm -fr .git &&
9 git init
@@ -41,10 +25,21 @@ test_expect_success 'v3 dumps not supported' '
25 test_cmp empty stream
26 '
27
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' '
43 git init simple-git &&
44 test-svn-fe "$TEST_DIRECTORY/t9135/svn.dump" >simple.fe &&
45 (