From 2fc0e8e520aabe6c16937823e9fb2db5f79a5c4b Mon Sep 17 00:00:00 2001 From: Foo Date: Sun, 25 Feb 2018 22:26:00 +0300 Subject: [PATCH] Use proper $PYTHON in case of UCS2 build and non-bash script --- tests/shlib/common.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/shlib/common.sh b/tests/shlib/common.sh index e6ff6d33..732f872d 100644 --- a/tests/shlib/common.sh +++ b/tests/shlib/common.sh @@ -11,15 +11,19 @@ export LD_LIBRARY_PATH export USER export HOME -. tests/bot-ci/scripts/common/main.sh silent - -if test -n "$USE_UCS2_PYTHON" && test -n "$BASH_VERSION" ; then - set +e - . virtualenvwrapper.sh - workon cpython-ucs2-$UCS2_PYTHON_VARIANT - set -e +if test -n "$USE_UCS2_PYTHON" ; then + POWERLINE_VIRTUALENV="cpython-ucs2-$UCS2_PYTHON_VARIANT" + PYTHON="$HOME/.virtualenvs/$POWERLINE_VIRTUALENV/bin/python" + if test -n "$BASH_VERSION" ; then + set +e + . virtualenvwrapper.sh + workon "$POWERLINE_VIRTUALENV" + set -e + fi fi +. tests/bot-ci/scripts/common/main.sh silent + export USER HOME if test -z "$FAILED" ; then