git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/5] t/t5800: skip if python version is older than 2.5

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jun 2, 2010, 00:13 UTC
Message-ID
<Wt_M4qptcPdpY0Q3jqUbfCU_HpY9NEjqs9eujZFD2rsUj5HRo__oQm7EUCxzXu38mC0y-ilUA14@cipher.nrlssc.navy.mil>
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
Previous: Brandon CaseyNext: Sverre Rabbelier
Message 2 of 31 in “miscellaneous test suite fixes”
  1. 0/5 miscellaneous test suite fixesBrandon Casey, Jun 2, 2010
  2. 1/5 t/t5800: skip if python version is older than 2.5Brandon Casey, Jun 2, 2010
  3. Sverre RabbelierJun 2, 2010
  4. Ævar Arnfjörð BjarmasonJun 2, 2010
  5. Brandon CaseyJun 2, 2010
  6. Brandon CaseyJun 2, 2010
  7. Sverre RabbelierJun 2, 2010
  8. Brandon CaseyJun 2, 2010
  9. test suite work-around for python 2.5 requirementBrandon Casey, Jun 2, 2010
  10. 1/2 Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONSBrandon Casey, Jun 2, 2010
  11. 2/2 t/t5800: skip if python version is older than 2.5Brandon Casey, Jun 2, 2010
  12. Sverre RabbelierAug 17, 2010
  13. Jonathan NiederAug 17, 2010
  14. Sverre RabbelierAug 17, 2010
  15. Jonathan NiederAug 17, 2010
  16. Sverre RabbelierAug 18, 2010
  17. Brandon CaseyAug 18, 2010
  18. Johannes SixtJun 2, 2010
  19. Brandon CaseyJun 2, 2010
  20. 2/5 git-request-pull.sh: remove -e switch to shell interpreter which breaks kshBrandon Casey, Jun 2, 2010
  21. Jonathan NiederJun 2, 2010
  22. Brandon CaseyJun 2, 2010
  23. Junio C HamanoJun 2, 2010
  24. 3/5 t/t5150: remove space from sed scriptBrandon Casey, Jun 2, 2010
  25. Jonathan NiederJun 2, 2010
  26. 4/5 t/t7006: ignore return status of shell's unset builtinBrandon Casey, Jun 2, 2010
  27. Jonathan NiederJun 2, 2010
  28. Johannes SixtJun 2, 2010
  29. Brandon CaseyJun 2, 2010
  30. 4/5 t/t7006: ignore return status of shell's unset builtinBrandon Casey, Jun 2, 2010
  31. 5/5 t/aggregate-results: accomodate systems with small max argument list lengthBrandon Casey, Jun 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.