6 # for clean cvsps cache
10 if ! type cvs
>/dev
/null
2>&1
12 say
'skipping cvsimport tests, cvs not found'
19 cvsps_version
=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`
20 case "$cvsps_version" in
24 say
'skipping cvsimport tests, cvsps not found'
28 say
'skipping cvsimport tests, unsupported cvsps version'
34 # Usage: test_cvs_co BRANCH_NAME
35 rm -rf module-cvs-
"$1"
36 if [ "$1" = "master" ]
38 $CVS co
-P -d module-cvs-
"$1" -A module
40 $CVS co
-P -d module-cvs-
"$1" -r "$1" module
45 # Usage: test_git_co BRANCH_NAME
46 (cd module-git
&& git checkout
"$1")
49 test_cmp_branch_file
() {
50 # Usage: test_cmp_branch_file BRANCH_NAME PATH
51 # The branch must already be checked out of CVS and git.
52 test_cmp module-cvs-
"$1"/"$2" module-git
/"$2"
55 test_cmp_branch_tree
() {
56 # Usage: test_cmp_branch_tree BRANCH_NAME
57 # Check BRANCH_NAME out of CVS and git and make sure that all
58 # of the files and directories are identical.
64 find .
-type d
-name CVS
-prune -o -type f
-print
65 ) |
sort >module-cvs-
"$1".list
&&
68 find .
-type d
-name .git
-prune -o -type f
-print
69 ) |
sort >module-git-
"$1".list
&&
70 test_cmp module-cvs-
"$1".list module-git-
"$1".list
&&
71 cat module-cvs-
"$1".list |
while read f
73 test_cmp_branch_file
"$1" "$f" ||
return 1