From: Junio C Hamano Date: Thu, 8 Dec 2005 05:52:28 +0000 (-0800) Subject: Make sure we use compat/subprocess.py with Python 2.3 while running tests. X-Git-Tag: v0.99.9m^2~41 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=49ccb0877f64308662669a09db7b221419c13d0a;p=git.git 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 --- diff --git a/t/test-lib.sh b/t/test-lib.sh index f2eccd791..0539dacc1 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