@matheusbsbs / matheus-bagliano / commits / 9b777a165e
Fork 0

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>

Junio C Hamano committed Aug 16, 2010 at 09:25 UTC 9b777a165e050f9a881a74a5902a8ddd2de30da5
5 files changed +9 -11
t/Makefile
-1
@@ -29,7 +29,6 @@ pre-clean:
29
30 clean:
31 $(RM) -r 'trash directory'.* test-results
32 - $(RM) t????/cvsroot/CVSROOT/?*
32 $(RM) -r valgrind/bin
33 $(RM) .prove
34
t/lib-cvs.sh
+6
@@ -30,6 +30,12 @@ case "$cvsps_version" in
30 ;;
31 esac
32
33 +setup_cvs_test_repository () {
34 + CVSROOT="$(pwd)/.cvsroot" &&
35 + cp -r "$TEST_DIRECTORY/$1/cvsroot" "$CVSROOT" &&
36 + export CVSROOT
37 +}
38 +
39 test_cvs_co () {
40 # Usage: test_cvs_co BRANCH_NAME
41 rm -rf module-cvs-"$1"
t/t9601-cvsimport-vendor-branch.sh
+1 -4
@@ -34,10 +34,7 @@
34 test_description='git cvsimport handling of vendor branches'
35 . ./lib-cvs.sh
36
37 -test_expect_success PERL 'setup CVSROOT' '
38 - CVSROOT="$TEST_DIRECTORY"/t9601/cvsroot &&
39 - export CVSROOT
40 -'
37 +setup_cvs_test_repository t9601
38
39 test_expect_success PERL 'import a module with a vendor branch' '
40
t/t9602-cvsimport-branches-tags.sh
+1 -4
@@ -6,10 +6,7 @@
6 test_description='git cvsimport handling of branches and tags'
7 . ./lib-cvs.sh
8
9 -test_expect_success PERL 'setup CVSROOT' '
10 - CVSROOT="$TEST_DIRECTORY"/t9602/cvsroot &&
11 - export CVSROOT
12 -'
9 +setup_cvs_test_repository t9602
10
11 test_expect_success PERL 'import module' '
12
t/t9603-cvsimport-patchsets.sh
+1 -2
@@ -14,8 +14,7 @@
14 test_description='git cvsimport testing for correct patchset estimation'
15 . ./lib-cvs.sh
16
17 -CVSROOT="$TEST_DIRECTORY"/t9603/cvsroot
18 -export CVSROOT
17 +setup_cvs_test_repository t9603
18
19 test_expect_failure 'import with criss cross times on revisions' '
20