summaryrefslogtreecommitdiff
path: root/.gitlab-ci/lava
diff options
context:
space:
mode:
authorGuilherme Gallo <guilherme.gallo@collabora.com>2023-02-15 00:13:16 -0300
committerMarge Bot <emma+marge@anholt.net>2023-02-16 13:08:41 +0000
commitca110658b7535645339c230ad3120bca81a071a9 (patch)
tree61f21f4fcded8d464c6c0e61ea1d82e1e3cf735e /.gitlab-ci/lava
parentcf9e1b953cab2356a29da9244263be077cf162ad (diff)
downloadmesa-ca110658b7535645339c230ad3120bca81a071a9.tar.gz
ci/lava: Move LAVA dependencies to pip
Use requirements.txt and requirements-test.txt to organize better Python dependencies related to LAVA. Now LAVA tooling can use recent and fixed library versions. And test-related libs will not trigger container rebuilding anymore. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21325>
Diffstat (limited to '.gitlab-ci/lava')
-rwxr-xr-x.gitlab-ci/lava/lava-pytest.sh5
-rw-r--r--.gitlab-ci/lava/requirements-test.txt5
-rw-r--r--.gitlab-ci/lava/requirements.txt1
3 files changed, 11 insertions, 0 deletions
diff --git a/.gitlab-ci/lava/lava-pytest.sh b/.gitlab-ci/lava/lava-pytest.sh
index ac0ef80c0a0..cb105385983 100755
--- a/.gitlab-ci/lava/lava-pytest.sh
+++ b/.gitlab-ci/lava/lava-pytest.sh
@@ -26,6 +26,11 @@
set -ex
+# Use this script in a python virtualenv for isolation
+python3 -m venv .venv
+. .venv/bin/activate
+python3 -m pip install -r ${CI_PROJECT_DIR}/.gitlab-ci/lava/requirements-test.txt
+
TEST_DIR=${CI_PROJECT_DIR}/.gitlab-ci/tests
PYTHONPATH="${TEST_DIR}:${PYTHONPATH}" python3 -m \
diff --git a/.gitlab-ci/lava/requirements-test.txt b/.gitlab-ci/lava/requirements-test.txt
new file mode 100644
index 00000000000..a45d2917962
--- /dev/null
+++ b/.gitlab-ci/lava/requirements-test.txt
@@ -0,0 +1,5 @@
+-r requirements.txt
+freezegun==1.1.0
+pytest==7.2.1
+pytest-cov==3.0.0
+PyYAML==5.3.1
diff --git a/.gitlab-ci/lava/requirements.txt b/.gitlab-ci/lava/requirements.txt
new file mode 100644
index 00000000000..7186eceb95e
--- /dev/null
+++ b/.gitlab-ci/lava/requirements.txt
@@ -0,0 +1 @@
+lavacli==1.5.2