[PATCH 2/2] t/t5800: skip if python version is older than 2.5
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Jun 2, 2010, 23:23 UTC
- Message-ID
- <injaoVtrfs7Li4aYBNxEQeawf3YbhxcYbL79Jvef2ML9502YRtjqEol2RVKBzXfH_PfbMep0lvU@cipher.nrlssc.navy.mil>
- In-Reply-To
- <AANLkTinQrdJeTxoZ207kvv5R_3qUj5ocGgAlC22SQyOg@mail.gmail.com>
From: Brandon Casey <drafnel@gmail.com>
This test script depends on the git-remote-testgit python script. The git-remote-testgit script makes use of the hashlib module which was released in python version 2.5. So, check the python version and skip this test if it's too old.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> ---
By the way, I don't have python 2.5 or newer to test this. :p
-brandon
t/t5800-remote-helpers.sh | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/t/t5800-remote-helpers.sh b/t/t5800-remote-helpers.sh index 75a0163..2e5efe6 100755 --- a/t/t5800-remote-helpers.sh +++ b/t/t5800-remote-helpers.sh @@ -7,9 +7,13 @@ 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' + say 'skipping git remote-testgit tests: requires Python 2.5 or newer' test_done fi
-- 1.6.6.2