ci/piglit: Make build-piglit safe for set -u

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
This commit is contained in:
Daniel Stone
2024-08-29 15:35:36 +01:00
committed by Marge Bot
parent 4ae2d97c36
commit a7824caa8b

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# shellcheck disable=SC2086 # we want word splitting
set -ex
set -uex
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
@@ -14,12 +14,12 @@ git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-ch
pushd /piglit
git checkout "$REV"
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS $EXTRA_CMAKE_ARGS
ninja $PIGLIT_BUILD_TARGETS
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS ${EXTRA_CMAKE_ARGS:-}
ninja ${PIGLIT_BUILD_TARGETS:-}
find . -depth \( -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' \) \
! -name 'include_test.h' -exec rm -rf {} \;
rm -rf target_api
if [ "$PIGLIT_BUILD_TARGETS" = "piglit_replayer" ]; then
if [ "${PIGLIT_BUILD_TARGETS:-}" = "piglit_replayer" ]; then
find . -depth \
! -regex "^\.$" \
! -regex "^\.\/piglit.*" \