summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8c5b85c)
raw | patch | inline | side by side (parent: 8c5b85c)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Mon, 23 Feb 2009 05:08:10 +0000 (06:08 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 24 Feb 2009 05:56:43 +0000 (21:56 -0800) |
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>
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>
t/lib-cvs.sh | [new file with mode: 0644] | patch | blob |
t/t9600-cvsimport.sh | patch | blob | history |
diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh
--- /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
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index d2379e7f62a4da76791e65dbc2c70f4dfe14ff3b..98077ab12b7b665ea068b5ef27fc20edadd5ebc4 100755 (executable)
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
#!/bin/sh
test_description='git cvsimport basic tests'
-. ./test-lib.sh
+. ./lib-cvs.sh
CVSROOT=$(pwd)/cvsroot
export CVSROOT
-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
test_expect_success 'setup cvsroot' 'cvs init'