فهرست منبع

CI: install avocado in venv if host does not have it

Avocado packages are currently not available in Debian. Use virtualenv
and pip for sites that do not provide avocado as part of execution
environment. We expect the execution environment to be Debian-based and
to allow us to sudo (true for kas-isar container).

Use version 88.0 as the latest working one from pip.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
Henning Schild 3 سال پیش
والد
کامیت
c27fc11460
1فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 11 0
      scripts/ci_build.sh

+ 11 - 0
scripts/ci_build.sh

@@ -14,6 +14,17 @@ export PATH=$PATH:/sbin
 # Go to Isar root
 cd "$(dirname "$0")/.."
 
+# install avocado in virtualenv in case it is not there already
+if ! command -v avocado > /dev/null; then
+    sudo apt-get update -qq
+    sudo apt-get install -y virtualenv
+    rm -rf /tmp/avocado_venv
+    virtualenv --python python3 /tmp/avocado_venv
+    source /tmp/avocado_venv/bin/activate
+    # The latest working version of Avocado framework
+    pip install avocado-framework==88.0
+fi
+
 # Get Avocado build tests path
 BUILD_TEST_DIR="$(pwd)/testsuite/build_test"