ci/lava: Make it easier to run pytest locally

If we don't have ${CI_PROJECT_DIR} set, just find it from where we're
running the script.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
This commit is contained in:
Daniel Stone
2024-09-02 11:57:06 +01:00
committed by Marge Bot
parent eae6e122ab
commit 3fd72266cd

View File

@@ -6,7 +6,11 @@
# This script runs unit/integration tests related with LAVA CI tools
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
set -ex
set -exu
if [ -z "${CI_PROJECT_DIR:-}" ]; then
CI_PROJECT_DIR="$(dirname "${0}")/../../"
fi
# Use this script in a python virtualenv for isolation
python3 -m venv .venv