aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-11-04 09:27:28 +0000
committerPeter Mikus <pmikus@cisco.com>2019-11-29 12:03:24 +0000
commited0258a440cfad7023d643f717ab78ac568dc59b (patch)
tree1c95644f63d9273cf805a4f102f9f5d84e85b329 /resources/libraries/bash
parent497f606967363d88b4b36b74859ad360eba9eccd (diff)
Python3: PIP requirement
- Install via PIP3 - Use virtualenv Python3 interpret Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Iad22b344b418a1d91774d23d5ea17bfd48d394b3
Diffstat (limited to 'resources/libraries/bash')
-rw-r--r--resources/libraries/bash/function/common.sh11
1 files changed, 6 insertions, 5 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