remote-helpers: tests: use python directly
authorFelipe Contreras <felipe.contreras@gmail.com>
Fri, 17 May 2013 21:10:07 +0000 (16:10 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 May 2013 18:59:44 +0000 (11:59 -0700)
These remote helpers use 'env python', not PYTHON_PATH, so that's where
we should check for the extensions. Otherwise, if 'python' is not
PYTHON_PATH (e.g. /usr/bin/python: Makefile's default), there will be a
mismatch between the python libraries actually accessible to the remote
helpers.

Suggested by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/test-bzr.sh
contrib/remote-helpers/test-hg-bidi.sh
contrib/remote-helpers/test-hg-hg-git.sh
contrib/remote-helpers/test-hg.sh
index 5dfa070b64e6e4607adaa436d4aa839c9de5f9e4..2c89caa3542c44ce7d2e6cf341c853835ad3529d 100755 (executable)
@@ -12,7 +12,7 @@ if ! test_have_prereq PYTHON; then
        test_done
 fi
 
-if ! "$PYTHON_PATH" -c 'import bzrlib'; then
+if ! python -c 'import bzrlib'; then
        skip_all='skipping remote-bzr tests; bzr not available'
        test_done
 fi
index f5696977342fc91f85a6d8b564677e6ace8a78d0..2c693d07d9ac3071cee9109576c48e3cc06c7045 100755 (executable)
@@ -15,7 +15,7 @@ if ! test_have_prereq PYTHON; then
        test_done
 fi
 
-if ! "$PYTHON_PATH" -c 'import mercurial'; then
+if ! python -c 'import mercurial'; then
        skip_all='skipping remote-hg tests; mercurial not available'
        test_done
 fi
index 7f579c843680897ce065bca92fe60fd29aff23b2..1a212b88b0da147bdd5d2f5da53a6870a2198e57 100755 (executable)
@@ -15,12 +15,12 @@ if ! test_have_prereq PYTHON; then
        test_done
 fi
 
-if ! "$PYTHON_PATH" -c 'import mercurial'; then
+if ! python -c 'import mercurial'; then
        skip_all='skipping remote-hg tests; mercurial not available'
        test_done
 fi
 
-if ! "$PYTHON_PATH" -c 'import hggit'; then
+if ! python -c 'import hggit'; then
        skip_all='skipping remote-hg tests; hg-git not available'
        test_done
 fi
index 8de2aa7fec2f030d39b9b64a3ad3345b94b41add..ce03fa317e1fcb6f4248ed07e7eb4e47ed2d7ae1 100755 (executable)
@@ -15,7 +15,7 @@ if ! test_have_prereq PYTHON; then
        test_done
 fi
 
-if ! "$PYTHON_PATH" -c 'import mercurial'; then
+if ! python -c 'import mercurial'; then
        skip_all='skipping remote-hg tests; mercurial not available'
        test_done
 fi