]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9010-svn-fe.sh
Merge branch 'rj/maint-test-fixes'
[thirdparty/git.git] / t / t9010-svn-fe.sh
CommitLineData
21746aa3
DB
1#!/bin/sh
2
3test_description='check svn dumpfile importer'
4
b0ad24be 5. ./test-lib.sh
21746aa3 6
8e9d453c
JH
7if ! svnadmin -h >/dev/null 2>&1
8then
9 skip_all='skipping svn-fe tests, svn not available'
10 test_done
11fi
12
b0ad24be
RR
13svnconf=$PWD/svnconf
14export svnconf
15
16svn_cmd () {
17 subcommand=$1 &&
18 shift &&
19 mkdir -p "$svnconf" &&
20 svn "$subcommand" --config-dir "$svnconf" "$@"
21}
22
23test_dump () {
21746aa3
DB
24 label=$1
25 dump=$2
26 test_expect_success "$dump" '
27 svnadmin create "$label-svn" &&
28 svnadmin load "$label-svn" < "$TEST_DIRECTORY/$dump" &&
24f11368 29 svn_cmd export "file://$PWD/$label-svn" "$label-svnco" &&
21746aa3
DB
30 git init "$label-git" &&
31 test-svn-fe "$TEST_DIRECTORY/$dump" >"$label.fe" &&
32 (
33 cd "$label-git" &&
34 git fast-import < ../"$label.fe"
35 ) &&
36 (
37 cd "$label-svnco" &&
38 git init &&
39 git add . &&
40 git fetch "../$label-git" master &&
41 git diff --exit-code FETCH_HEAD
42 )
43 '
44}
45
7e45e056 46test_dump simple t9135/svn.dump
21746aa3
DB
47
48test_done