From ef745265be937afa2ea52071b7e2157a6393b6c5 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Fri, 25 Oct 2024 12:12:47 +0300 Subject: [PATCH] ci/scripts/test: Place XDG_RUNTIME_DIR in /tmp when running locally Avoid polluting the pwd/current checkout you are working from Part-of: --- ci/scripts/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/scripts/test.sh b/ci/scripts/test.sh index aea9191d4e..6e4dcbedf9 100755 --- a/ci/scripts/test.sh +++ b/ci/scripts/test.sh @@ -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