All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brandon Casey <casey@nrlssc.navy.mil>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Brandon Casey <drafnel@gmail.com>,
	Sverre Rabbelier <srabbelier@gmail.com>
Subject: [PATCH 1/5] t/t5800: skip if python version is older than 2.5
Date: Tue,  1 Jun 2010 19:13:40 -0500	[thread overview]
Message-ID: <Wt_M4qptcPdpY0Q3jqUbfCU_HpY9NEjqs9eujZFD2rsUj5HRo__oQm7EUCxzXu38mC0y-ilUA14@cipher.nrlssc.navy.mil> (raw)
In-Reply-To: <Wt_M4qptcPdpY0Q3jqUbfIk6yMCN9Ja5RCtRUsADK5OJGrz7R_Cq1oGpeQoN7A9uCvw38jm63Jo@cipher.nrlssc.navy.mil>

From: Brandon Casey <drafnel@gmail.com>

This test script depends on the git-remote-testgit python script.  This
python script makes use of the hashlib module which was released in python
version 2.5.  So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to
test-lib.sh and check for it in t5800.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 t/t5800-remote-helpers.sh |    4 ++--
 t/test-lib.sh             |    9 +++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/t/t5800-remote-helpers.sh b/t/t5800-remote-helpers.sh
index 75a0163..58f60ab 100755
--- a/t/t5800-remote-helpers.sh
+++ b/t/t5800-remote-helpers.sh
@@ -7,9 +7,9 @@ test_description='Test remote-helper import and export commands'
 
 . ./test-lib.sh
 
-if ! test_have_prereq PYTHON
+if ! test_have_prereq PYTHON_2_5_OR_NEWER
 then
-	say 'skipping git remote-testgit tests: requires Python support'
+	say 'skipping git remote-testgit tests: requires Python 2.5 or newer'
 	test_done
 fi
 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 454880a..ce56e1c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -846,6 +846,15 @@ esac
 test -z "$NO_PERL" && test_set_prereq PERL
 test -z "$NO_PYTHON" && test_set_prereq PYTHON
 
+if test_have_prereq PYTHON && "$PYTHON_PATH" -c '
+import sys
+if sys.hexversion < 0x02050000:
+    sys.exit(1)
+'
+then
+	test_set_prereq PYTHON_2_5_OR_NEWER
+fi
+
 # test whether the filesystem supports symbolic links
 ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
 rm -f y
-- 
1.6.6.2

  reply	other threads:[~2010-06-02  0:14 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02  0:13 [PATCH 0/5] miscellaneous test suite fixes Brandon Casey
2010-06-02  0:13 ` Brandon Casey [this message]
2010-06-02  6:21   ` [PATCH 1/5] t/t5800: skip if python version is older than 2.5 Sverre Rabbelier
2010-06-02  9:33     ` Ævar Arnfjörð Bjarmason
2010-06-02 14:44     ` Brandon Casey
2010-06-02 15:15       ` Brandon Casey
2010-06-02 16:38         ` Sverre Rabbelier
2010-06-02 16:50           ` Brandon Casey
2010-06-02 23:23     ` test suite work-around for python 2.5 requirement Brandon Casey
2010-06-02 23:23     ` [PATCH 1/2] Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS Brandon Casey
2010-06-02 23:23     ` [PATCH 2/2] t/t5800: skip if python version is older than 2.5 Brandon Casey
2010-08-17 23:15       ` Sverre Rabbelier
2010-08-17 23:28         ` Jonathan Nieder
2010-08-17 23:32           ` Sverre Rabbelier
2010-08-17 23:37             ` Jonathan Nieder
2010-08-18  0:10               ` Sverre Rabbelier
2010-08-18  2:37                 ` Brandon Casey
2010-06-02  6:37   ` [PATCH 1/5] " Johannes Sixt
2010-06-02 14:46     ` Brandon Casey
2010-06-02  0:13 ` [PATCH 2/5] git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh Brandon Casey
2010-06-02  4:30   ` Jonathan Nieder
2010-06-02 14:21     ` Brandon Casey
2010-06-02 23:37       ` Junio C Hamano
2010-06-02  0:13 ` [PATCH 3/5] t/t5150: remove space from sed script Brandon Casey
2010-06-02  4:12   ` Jonathan Nieder
2010-06-02  0:13 ` [PATCH 4/5] t/t7006: ignore return status of shell's unset builtin Brandon Casey
2010-06-02  5:47   ` Jonathan Nieder
2010-06-02  6:41   ` Johannes Sixt
2010-06-02 14:47     ` Brandon Casey
2010-06-02 15:32       ` [PATCH 4/5 v2] " Brandon Casey
2010-06-02  0:13 ` [PATCH 5/5] t/aggregate-results: accomodate systems with small max argument list length Brandon Casey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Wt_M4qptcPdpY0Q3jqUbfCU_HpY9NEjqs9eujZFD2rsUj5HRo__oQm7EUCxzXu38mC0y-ilUA14@cipher.nrlssc.navy.mil \
    --to=casey@nrlssc.navy.mil \
    --cc=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.