Skip to content

Commit

Permalink
remote-helpers: tests: use python directly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed May 21, 2013
1 parent 5e49f30 commit 02a6072
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contrib/remote-helpers/test-bzr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion contrib/remote-helpers/test-hg-bidi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions contrib/remote-helpers/test-hg-hg-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion contrib/remote-helpers/test-hg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 02a6072

Please sign in to comment.