summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-07 03:47:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-07 03:47:40 (GMT)
commit826ef0e5e510ecf39a06e8c08ae6e221bdfd5db3 (patch)
treecd52724d16da3ad0b3bf8690c14303bd9eb65243
parent0377ac98dcf797d4711d2f0757ce49171ee4bb04 (diff)
parent4f4d2017a370bdee57059d9454d4e1aca0741231 (diff)
downloadgit-826ef0e5e510ecf39a06e8c08ae6e221bdfd5db3.zip
git-826ef0e5e510ecf39a06e8c08ae6e221bdfd5db3.tar.gz
git-826ef0e5e510ecf39a06e8c08ae6e221bdfd5db3.tar.bz2
Merge branch 'ab/svn-tests-set-e-fix'
Test clean-up. * ab/svn-tests-set-e-fix: svn tests: refactor away a "set -e" in test body svn tests: remove legacy re-setup from init-clone test
-rwxr-xr-xt/t9117-git-svn-init-clone.sh6
-rwxr-xr-xt/t9148-git-svn-propset.sh27
2 files changed, 15 insertions, 18 deletions
diff --git a/t/t9117-git-svn-init-clone.sh b/t/t9117-git-svn-init-clone.sh
index 044f65e..62de819 100755
--- a/t/t9117-git-svn-init-clone.sh
+++ b/t/t9117-git-svn-init-clone.sh
@@ -7,12 +7,6 @@ test_description='git svn init/clone tests'
. ./lib-git-svn.sh
-# setup, run inside tmp so we don't have any conflicts with $svnrepo
-set -e
-rm -r .git
-mkdir tmp
-cd tmp
-
test_expect_success 'setup svnrepo' '
mkdir project project/trunk project/branches project/tags &&
echo foo > project/trunk/foo &&
diff --git a/t/t9148-git-svn-propset.sh b/t/t9148-git-svn-propset.sh
index 1026390..aebb289 100755
--- a/t/t9148-git-svn-propset.sh
+++ b/t/t9148-git-svn-propset.sh
@@ -7,19 +7,22 @@ test_description='git svn propset tests'
. ./lib-git-svn.sh
-foo_subdir2="subdir/subdir2/foo_subdir2"
+test_expect_success 'setup propset via import' '
+ test_when_finished "rm -rf import" &&
-set -e
-mkdir import &&
-(set -e ; cd import
- mkdir subdir
- mkdir subdir/subdir2
- touch foo # for 'add props top level'
- touch subdir/foo_subdir # for 'add props relative'
- touch "$foo_subdir2" # for 'add props subdir'
- svn_cmd import -m 'import for git svn' . "$svnrepo" >/dev/null
-)
-rm -rf import
+ foo_subdir2="subdir/subdir2/foo_subdir2" &&
+ mkdir -p import/subdir/subdir2 &&
+ (
+ cd import &&
+ # for "add props top level"
+ >foo &&
+ # for "add props relative"
+ >subdir/foo_subdir &&
+ # for "add props subdir"
+ >"$foo_subdir2" &&
+ svn_cmd import -m "import for git svn" . "$svnrepo"
+ )
+'
test_expect_success 'initialize git svn' '
git svn init "$svnrepo"