aboutsummaryrefslogtreecommitdiff
path: root/t/lib-cvs.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-16 09:25:01 -0700
committerJunio C Hamano <gitster@pobox.com>2010-08-18 12:43:24 -0700
commit9b777a165e050f9a881a74a5902a8ddd2de30da5 (patch)
tree37583b97574c2237448fff018cbf63be6c3b9d1b /t/lib-cvs.sh
parent06eaaa783c9ba36ac45143eaa3b707f804d377a4 (diff)
downloadgit-9b777a165e050f9a881a74a5902a8ddd2de30da5.tar.gz
git-9b777a165e050f9a881a74a5902a8ddd2de30da5.tar.xz
cvs tests: do not touch test CVS repositories shipped with source
Some tests in t96xx series (cvsimport) want to write into the control area (CVSROOT) of their test CVS repositories, but this does not work well when the source area is made read-only (test trash directories are moved via --root=else/where option). Copy the supplied test CVS repository to a scratch place at the beginning of these tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-cvs.sh')
-rw-r--r--t/lib-cvs.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh
index 648d1619c..b51d2e13a 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"