From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Haggerty Subject: [PATCH v2 1/5] Start a library for cvsimport-related tests Date: Sat, 21 Feb 2009 14:04:36 +0100 Message-ID: References: <1235221480-31473-1-git-send-email-mhagger@alum.mit.edu> Cc: gitster@pobox.com, peff@peff.net, Johannes.Schindelin@gmx.de, jnareb@gmail.com, Michael Haggerty To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Sat Feb 21 14:07:19 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1LarZZ-0004DE-9t for gcvg-git-2@gmane.org; Sat, 21 Feb 2009 14:07:13 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752475AbZBUNFQ (ORCPT ); Sat, 21 Feb 2009 08:05:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752456AbZBUNFO (ORCPT ); Sat, 21 Feb 2009 08:05:14 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:57478 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752367AbZBUNFM (ORCPT ); Sat, 21 Feb 2009 08:05:12 -0500 X-Envelope-From: mhagger@alum.mit.edu Received: from localhost.localdomain (77-21-84-251-dynip.superkabel.de [77.21.84.251]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id n1LD4fLD022313; Sat, 21 Feb 2009 14:04:42 +0100 X-Mailer: git-send-email 1.6.1.3 In-Reply-To: <1235221480-31473-1-git-send-email-mhagger@alum.mit.edu> X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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 --- t/lib-cvs.sh | 31 +++++++++++++++++++++++++++++++ t/t9600-cvsimport.sh | 29 +---------------------------- 2 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 t/lib-cvs.sh diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh new file mode 100644 index 0000000..bfc1c12 --- /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 d2379e7..98077ab 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 +. ./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' -- 1.6.1.3