From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Haggerty Subject: [PATCH v3 1/5] Start a library for cvsimport-related tests Date: Mon, 23 Feb 2009 06:08:10 +0100 Message-ID: References: <1235365694-28935-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 Mon Feb 23 06:10:22 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 1LbT59-00014D-30 for gcvg-git-2@gmane.org; Mon, 23 Feb 2009 06:10:19 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751476AbZBWFIl (ORCPT ); Mon, 23 Feb 2009 00:08:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751367AbZBWFIj (ORCPT ); Mon, 23 Feb 2009 00:08:39 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:37136 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236AbZBWFIg (ORCPT ); Mon, 23 Feb 2009 00:08:36 -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 n1N58Efw019166; Mon, 23 Feb 2009 06:08:15 +0100 X-Mailer: git-send-email 1.6.1.3 In-Reply-To: <1235365694-28935-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