freedreno: Add check_xml_includes to meson setup

This avoids wasting CI time by catching the error early. We do
still need the meson test to catch these issues locally when
rebuilding from an already configured build directory though.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
This commit is contained in:
Karmjit Mahil 2026-04-09 15:30:45 +01:00 committed by Marge Bot
parent 1208d84f3c
commit cd299b433e

View file

@ -53,6 +53,20 @@ if with_freedreno_vk
subdir('vulkan')
endif
# 77 is a convention used by Meson and other build systems to skip tests.
SKIP_RETURN_CODE = 77
check_xml_includes = run_command(
prog_python,
files('tests/check_xml_includes.py'),
check: false
)
if check_xml_includes.returncode() == SKIP_RETURN_CODE
message('Skipped checking freedreno XML includes.')
elif check_xml_includes.returncode() != 0
error('XML include check found errors:\n' + check_xml_includes.stdout())
endif
test('check-xml-includes',
prog_python,
args : files('tests/check_xml_includes.py'),