From 421e066ec4ff531e510d58bdf6f18d228a2ef440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 2 Sep 2022 11:26:29 +0200 Subject: [PATCH] ci: Check that all expected piglit results are there Without these, the build jobs would spuriously pass if some of the expected piglit tests didn't run at all. v2: * Use local variables instead of starting their names with underscores (Peter Hutterer) --- .gitlab-ci/build-and-test.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci/build-and-test.sh b/.gitlab-ci/build-and-test.sh index 5caf3b129..6631f9371 100755 --- a/.gitlab-ci/build-and-test.sh +++ b/.gitlab-ci/build-and-test.sh @@ -3,9 +3,30 @@ set -e set -o xtrace +check_piglit_results () +{ + local EXPECTED_RESULTS=build/test/piglit-results/$1 + local DEPENDENCY=build/$2 + + if ! test -e $DEPENDENCY; then + return + fi + + if test -e $EXPECTED_RESULTS; then + return + fi + + echo Expected $EXPECTED_RESULTS does not exist + exit 1 +} + meson -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true $MESON_EXTRA_OPTIONS build/ ninja -j${FDO_CI_CONCURRENT:-4} -C build/ dist export PIGLIT_DIR=/root/piglit XTEST_DIR=/root/xts ninja -j${FDO_CI_CONCURRENT:-4} -C build/ test + +check_piglit_results xephyr-glamor hw/kdrive/ephyr/Xephyr.p/ephyr_glamor.c.o +check_piglit_results xvfb hw/vfb/Xvfb +check_piglit_results xwayland hw/xwayland/Xwayland