ci: fix envvar default value
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

With 047bb6b8 on !35740, when GIT_STRATEGY is not defined, the scripts can
fail where we use `set -u` to raise an error when unset variables.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40759>
This commit is contained in:
Sergi Blanch Torne 2026-04-02 09:16:15 +02:00 committed by Marge Bot
parent 33864e569e
commit bae86c3118
3 changed files with 4 additions and 4 deletions

View file

@ -135,7 +135,7 @@ replay_s3_upload_images() {
SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\""
if [ "$GIT_STRATEGY" = none ]; then
if [ "${GIT_STRATEGY:-}" = none ]; then
cd $RESULTS_DIR && rm -rf ..?* .[!.]* *
fi
cd /piglit

View file

@ -130,7 +130,7 @@ export -f _error_msg
if [ -z "${RESULTS_DIR:-}" ]; then
export RESULTS_DIR="${PWD%/}/results"
if [ "$GIT_STRATEGY" = none ]; then
if [ "${GIT_STRATEGY:-}" = none ]; then
rm -rf "${RESULTS_DIR}"
fi
fi

View file

@ -149,7 +149,7 @@
.deqp-test:
script:
- if [ "$GIT_STRATEGY" = none ]; then rm -rf results; fi # Clear out old results if the docker container was cached
- if [ "${GIT_STRATEGY:-}" = none ]; then rm -rf results; fi # Clear out old results if the docker container was cached
- ./install/deqp-runner.sh
artifacts:
exclude:
@ -175,6 +175,6 @@
# setup).
- section_start artifacts_download "Downloading artifacts from s3"
# Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
- if [ "$GIT_STRATEGY" = none ]; then rm -rf install; fi
- if [ "${GIT_STRATEGY:-}" = none ]; then rm -rf install; fi
- (set -x; curl -L --retry 4 -f --retry-all-errors --retry-delay 60 ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst | tar --zstd -x)
- section_end artifacts_download