aboutsummaryrefslogtreecommitdiff
path: root/t/lib-cvs.sh
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2009-02-23 06:08:10 +0100
committerJunio C Hamano <gitster@pobox.com>2009-02-23 21:56:43 -0800
commit535bb89320ba949f0d64eda530ba5dec0ec6f188 (patch)
tree0a43fc3cde32b2fcc546e12d6391fd0e893176fb /t/lib-cvs.sh
parent8c5b85ce87d15e4db37a6408f03b0eb71dde080e (diff)
downloadgit-535bb89320ba949f0d64eda530ba5dec0ec6f188.tar.gz
git-535bb89320ba949f0d64eda530ba5dec0ec6f188.tar.xz
Start a library for cvsimport-related tests
For now the library just includes code (moved from t/t9600-cvsimport.sh) that checks whether the prerequisites for "git cvsimport" are installed. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-cvs.sh')
-rw-r--r--t/lib-cvs.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh
new file mode 100644
index 000000000..bfc1c12f3
--- /dev/null
+++ b/t/lib-cvs.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+. ./test-lib.sh
+
+unset CVS_SERVER
+# for clean cvsps cache
+HOME=$(pwd)
+export HOME
+
+if ! type cvs >/dev/null 2>&1
+then
+ say 'skipping cvsimport tests, cvs not found'
+ test_done
+ exit
+fi
+
+cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`
+case "$cvsps_version" in
+2.1 | 2.2*)
+ ;;
+'')
+ say 'skipping cvsimport tests, cvsps not found'
+ test_done
+ exit
+ ;;
+*)
+ say 'skipping cvsimport tests, unsupported cvsps version'
+ test_done
+ exit
+ ;;
+esac