summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-08 05:52:28 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-08 06:05:05 (GMT)
commit49ccb0877f64308662669a09db7b221419c13d0a (patch)
treed39d77ca63a5aa462ad28ed405e98f727d2a9dc8
parent128aed684d0b3099092b7597c8644599b45b7503 (diff)
downloadgit-49ccb0877f64308662669a09db7b221419c13d0a.zip
git-49ccb0877f64308662669a09db7b221419c13d0a.tar.gz
git-49ccb0877f64308662669a09db7b221419c13d0a.tar.bz2
Make sure we use compat/subprocess.py with Python 2.3 while running tests.
Otherwise the test will not succeed without installing. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xt/test-lib.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index f2eccd7..0539dac 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -172,7 +172,18 @@ test_done () {
# t/ subdirectory and are run in trash subdirectory.
PATH=$(pwd)/..:$PATH
GIT_EXEC_PATH=$(pwd)/..
-export GIT_EXEC_PATH
+export PATH GIT_EXEC_PATH
+
+# Similarly use ../compat/subprocess.py if our python does not
+# have subprocess.py on its own.
+PYTHON=`sed -e '1{
+ s/^#!//
+ q
+}' ../git-merge-recursive` &&
+"$PYTHON" -c 'import subprocess' 2>/dev/null || {
+ PYTHONPATH=$(pwd)/../compat
+ export PYTHONPATH
+}
# Test repository
test=trash