[PATCH 1/4] Start a library for cvsimport-related tests

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michael Haggerty
Date: Thursday, February 19, 2009 - 10:18 pm

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>
---
 t/t9600-cvsimport.sh |   29 +----------------------------
 t/t96xx/cvs-lib.sh   |   31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 28 deletions(-)
 create mode 100644 t/t96xx/cvs-lib.sh

diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index d2379e7..b4b9896 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -1,37 +1,10 @@
 #!/bin/sh
 
 test_description='git cvsimport basic tests'
-. ./test-lib.sh
+. ./t96xx/cvs-lib.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'
 
diff --git a/t/t96xx/cvs-lib.sh b/t/t96xx/cvs-lib.sh
new file mode 100644
index 0000000..bfc1c12
--- /dev/null
+++ b/t/t96xx/cvs-lib.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
-- 
1.6.1.3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/4] Add more tests of cvsimport, Michael Haggerty, (Thu Feb 19, 10:18 pm)
[PATCH 1/4] Start a library for cvsimport-related tests, Michael Haggerty, (Thu Feb 19, 10:18 pm)
[PATCH 2/4] Use CVS's -f option if available (ignore user' ..., Michael Haggerty, (Thu Feb 19, 10:18 pm)
[PATCH 4/4] Add some tests of git-cvsimport's handling of ..., Michael Haggerty, (Thu Feb 19, 10:18 pm)
Re: [PATCH 0/4] Add more tests of cvsimport, Jeff King, (Thu Feb 19, 11:25 pm)
Re: [PATCH 0/4] Add more tests of cvsimport, Ferry Huberts (Pelagic), (Fri Feb 20, 1:27 am)
Re: [PATCH 0/4] Add more tests of cvsimport, Michael Haggerty, (Fri Feb 20, 3:21 am)
Re: [PATCH 0/4] Add more tests of cvsimport, Jeff King, (Fri Feb 20, 8:00 am)
Re: [PATCH 0/4] Add more tests of cvsimport, Samuel Lucas Vaz de ..., (Fri Feb 20, 2:26 pm)
Re: [PATCH 0/4] Add more tests of cvsimport, Michael Haggerty, (Fri Feb 20, 11:32 pm)
Re: [PATCH 0/4] Add more tests of cvsimport, Michael Haggerty, (Sat Feb 21, 6:05 am)
Re: [PATCH 0/4] Add more tests of cvsimport, Ferry Huberts (Pelagic), (Sat Feb 21, 6:19 am)