xserver/.gitlab-ci/build-and-test.sh
Michel Dänzer b2dee689fa ci: Use "meson test" instead of "ninja test"
This lets us actually limit the number of test processes spawned in
parallel.

(ninja test runs meson test without --num-processes, so it ends up
spawning as many processes in parallel as there are CPU cores)
2023-01-19 15:07:57 +01:00

33 lines
806 B
Shell
Executable file

#!/bin/bash
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/
meson test --num-processes ${FDO_CI_CONCURRENT:-4} --print-errorlogs -C build/
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