Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/Makefile1
-rw-r--r--t/lib-cvs.sh6
-rwxr-xr-xt/t9601-cvsimport-vendor-branch.sh5
-rwxr-xr-xt/t9602-cvsimport-branches-tags.sh5
-rwxr-xr-xt/t9603-cvsimport-patchsets.sh3
5 files changed, 9 insertions, 11 deletions
diff --git a/t/Makefile b/t/Makefile
index d9c67f5609..c7baefb7ea 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -29,7 +29,6 @@ pre-clean:
clean:
$(RM) -r 'trash directory'.* test-results
- $(RM) t????/cvsroot/CVSROOT/?*
$(RM) -r valgrind/bin
$(RM) .prove
diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh
index 648d1619c8..b51d2e13a6 100644
--- a/t/lib-cvs.sh
+++ b/t/lib-cvs.sh
@@ -30,6 +30,12 @@ case "$cvsps_version" in
;;
esac
+setup_cvs_test_repository () {
+ CVSROOT="$(pwd)/.cvsroot" &&
+ cp -r "$TEST_DIRECTORY/$1/cvsroot" "$CVSROOT" &&
+ export CVSROOT
+}
+
test_cvs_co () {
# Usage: test_cvs_co BRANCH_NAME
rm -rf module-cvs-"$1"
diff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh
index 71178e2e5f..827d39f5bf 100755
--- a/t/t9601-cvsimport-vendor-branch.sh
+++ b/t/t9601-cvsimport-vendor-branch.sh
@@ -34,10 +34,7 @@
test_description='git cvsimport handling of vendor branches'
. ./lib-cvs.sh
-test_expect_success PERL 'setup CVSROOT' '
- CVSROOT="$TEST_DIRECTORY"/t9601/cvsroot &&
- export CVSROOT
-'
+setup_cvs_test_repository t9601
test_expect_success PERL 'import a module with a vendor branch' '
diff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh
index 89da4aead5..e1db323f54 100755
--- a/t/t9602-cvsimport-branches-tags.sh
+++ b/t/t9602-cvsimport-branches-tags.sh
@@ -6,10 +6,7 @@
test_description='git cvsimport handling of branches and tags'
. ./lib-cvs.sh
-test_expect_success PERL 'setup CVSROOT' '
- CVSROOT="$TEST_DIRECTORY"/t9602/cvsroot &&
- export CVSROOT
-'
+setup_cvs_test_repository t9602
test_expect_success PERL 'import module' '
diff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh
index 958bdce4dd..93c4fa885e 100755
--- a/t/t9603-cvsimport-patchsets.sh
+++ b/t/t9603-cvsimport-patchsets.sh
@@ -14,8 +14,7 @@
test_description='git cvsimport testing for correct patchset estimation'
. ./lib-cvs.sh
-CVSROOT="$TEST_DIRECTORY"/t9603/cvsroot
-export CVSROOT
+setup_cvs_test_repository t9603
test_expect_failure 'import with criss cross times on revisions' '