ci/scripts/test: Place XDG_RUNTIME_DIR in /tmp when running locally

Avoid polluting the pwd/current checkout you are working from

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7591>
This commit is contained in:
Jordan Petridis 2024-10-25 12:12:47 +03:00 committed by GStreamer Marge Bot
parent e6e2653bf8
commit ef745265be

View file

@ -17,7 +17,8 @@ timeout="${TIMEOUT_FACTOR:="2"}"
validate="${EXTRA_VALIDATE_ARGS:=""}"
parent="${CI_PROJECT_DIR:-$(pwd)}"
export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
# Put the runtime dir inside CI_PROJECT_DIR or in /tmp if we are running locally
export XDG_RUNTIME_DIR="$(mktemp -p "${CI_PROJECT_DIR:-/tmp}" -d xdg-runtime-XXXXXX)"
echo "-> Running $tests"
# Disable all cpu extensions post AVX to match what valgrind supports