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>
Junio C Hamano committed
Dec 7, 2005 at 21:52 UTC
49ccb0877f64308662669a09db7b221419c13d0a
1 file changed
+12
-1
t/test-lib.sh
+12
-1
@@ -172,7 +172,18 @@ test_done () {
172
# t/ subdirectory and are run in trash subdirectory.
173
PATH=$(pwd)/..:$PATH
174
GIT_EXEC_PATH=$(pwd)/..
175
-export GIT_EXEC_PATH
175
+export PATH GIT_EXEC_PATH
176
+
177
+# Similarly use ../compat/subprocess.py if our python does not
178
+# have subprocess.py on its own.
179
+PYTHON=`sed -e '1{
180
+ s/^#!//
181
+ q
182
+}' ../git-merge-recursive` &&
183
+"$PYTHON" -c 'import subprocess' 2>/dev/null || {
184
+ PYTHONPATH=$(pwd)/../compat
185
+ export PYTHONPATH
186
+}
187
188
# Test repository
189
test=trash