aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/bash/function/common.sh11
-rw-r--r--resources/libraries/python/SetupFramework.py5
2 files changed, 9 insertions, 7 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index 1ef7c93da3..3a7a0fbf7d 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -113,16 +113,16 @@ function activate_virtualenv () {
env_dir="${root_path}/env"
req_path=${2-$CSIT_DIR/requirements.txt}
rm -rf "${env_dir}" || die "Failed to clean previous virtualenv."
- pip install --upgrade virtualenv || {
+ pip3 install --upgrade virtualenv || {
die "Virtualenv package install failed."
}
- virtualenv "${env_dir}" || {
- die "Virtualenv creation failed."
+ virtualenv -p $(which python3) "${env_dir}" || {
+ die "Virtualenv creation for $(which python) failed."
}
set +u
source "${env_dir}/bin/activate" || die "Virtualenv activation failed."
set -u
- pip install --upgrade -r "${req_path}" || {
+ pip3 install --upgrade -r "${req_path}" || {
die "Requirements installation failed."
}
# Most CSIT Python scripts assume PYTHONPATH is set and exported.
@@ -637,7 +637,8 @@ function run_pybot () {
pushd "${CSIT_DIR}" || die "Change directory operation failed."
set +e
- pybot "${all_options[@]}" "${GENERATED_DIR}/tests/"
+ python -V
+ robot "${all_options[@]}" "${GENERATED_DIR}/tests/"
PYBOT_EXIT_STATUS="$?"
set -e
diff --git a/resources/libraries/python/SetupFramework.py b/resources/libraries/python/SetupFramework.py
index 760d958c54..3f74057832 100644
--- a/resources/libraries/python/SetupFramework.py
+++ b/resources/libraries/python/SetupFramework.py
@@ -111,8 +111,9 @@ def create_env_directory_at_node(node):
.format(host))
exec_cmd_no_error(
node, 'cd {0} && rm -rf env'
- ' && virtualenv --system-site-packages --never-download env'
- ' && source env/bin/activate && pip install -r requirements.txt'
+ ' && virtualenv -p $(which python3) '
+ '--system-site-packages --never-download env'
+ ' && source env/bin/activate && pip3 install -r requirements.txt'
.format(con.REMOTE_FW_DIR), timeout=100, include_reason=True,
message="Failed install at node {host}".format(host=host))
logger.console('Virtualenv setup on {0} done.'.format(host))