Skip to content

Commit

Permalink
t/t5800: skip if python version is older than 2.5
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed Jun 2, 2010
1 parent 225c93a commit 2bf1033
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions t/t5800-remote-helpers.sh
Original file line number Diff line number Diff line change
@@ -7,9 +7,15 @@ test_description='Test remote-helper import and export commands'

. ./test-lib.sh

if ! test_have_prereq PYTHON
if test_have_prereq PYTHON && "$PYTHON_PATH" -c '
import sys
if sys.hexversion < 0x02050000:
sys.exit(1)
'
then
say 'skipping git remote-testgit tests: requires Python support'
:
else
say 'skipping git remote-testgit tests: requires Python 2.5 or newer'
test_done
fi

0 comments on commit 2bf1033

Please sign in to comment.