tracie: Make tests independent of environment

Provide some sensible values for required environment variables to allow
tests to run properly in any environment.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6598>
This commit is contained in:
Alexandros Frantzis 2020-09-03 14:22:40 +03:00
parent 171e94fe62
commit dd471928c9
2 changed files with 5 additions and 2 deletions

View File

@ -33,7 +33,7 @@ mkdir -p $RESULTS
# Perform a self-test to ensure tracie is working properly.
if [ -z "$TRACIE_NO_UNIT_TESTS" ]; then
TRACIE_UPLOAD_TO_MINIO=0 python3 -m pytest -v --pyargs $INSTALL/tracie/tests/test.py
python3 -m pytest -v --pyargs $INSTALL/tracie/tests/test.py
fi
if [ "$GALLIUM_DRIVER" = "virpipe" ]; then

View File

@ -58,7 +58,10 @@ def prepare_for_run(tmp_path):
shutil.move("./tests/test-data", "./traces-db")
# Disable trace storing
environ["TRACIE_STORE_IMAGES"] = "0"
environ["TRACIE_UPLOAD_TO_MINIO"] = "0"
environ["CI_PROJECT_PATH"] = "test-project"
environ["CI_PIPELINE_ID"] = "667"
environ["CI_JOB_ID"] = "42"
def cleanup(tmp_path):
'''