From 85773d4d210f4497f93322da8005419a271058a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Sat, 25 Oct 2025 07:37:48 +0200 Subject: [PATCH] Detect xmllint at build time Detect whether and where the xmllint utility is available at build time, so that it can be used in system tests. If the tool is not found, specific checks employing it will be skipped. --- bin/tests/system/isctest/vars/.build_vars/XMLLINT.in | 1 + bin/tests/system/isctest/vars/.build_vars/meson.build | 1 + bin/tests/system/isctest/vars/build.py | 1 + meson.build | 1 + 4 files changed, 4 insertions(+) create mode 100644 bin/tests/system/isctest/vars/.build_vars/XMLLINT.in diff --git a/bin/tests/system/isctest/vars/.build_vars/XMLLINT.in b/bin/tests/system/isctest/vars/.build_vars/XMLLINT.in new file mode 100644 index 0000000000..9364f0fb42 --- /dev/null +++ b/bin/tests/system/isctest/vars/.build_vars/XMLLINT.in @@ -0,0 +1 @@ +@XMLLINT@ diff --git a/bin/tests/system/isctest/vars/.build_vars/meson.build b/bin/tests/system/isctest/vars/.build_vars/meson.build index deef5adda1..8958b3820a 100644 --- a/bin/tests/system/isctest/vars/.build_vars/meson.build +++ b/bin/tests/system/isctest/vars/.build_vars/meson.build @@ -34,6 +34,7 @@ foreach name, prog : { 'PYTEST': pytest, 'PYTHON': python, 'SHELL': sh, + 'XMLLINT': xmllint, 'XSLTPROC': xsltproc, } if prog.found() diff --git a/bin/tests/system/isctest/vars/build.py b/bin/tests/system/isctest/vars/build.py index a71256bba3..e22fb95a0f 100644 --- a/bin/tests/system/isctest/vars/build.py +++ b/bin/tests/system/isctest/vars/build.py @@ -48,6 +48,7 @@ def load_vars_from_build_files() -> Dict[str, str]: "PYTHON", "SHELL", "TOP_SRCDIR", + "XMLLINT", "XSLTPROC", ]: var_file = var_dir / var diff --git a/meson.build b/meson.build index b1552528ce..c8c7832164 100644 --- a/meson.build +++ b/meson.build @@ -100,6 +100,7 @@ git = find_program('git', required: false) jq = find_program('jq', required: false) nc = find_program('nc', required: false) python = find_program(['python3', 'python'], required: false) +xmllint = find_program('xmllint', required: false) xsltproc = find_program('xsltproc', required: false) pytest = find_program( ['pytest-3', 'py.test-3', 'pytest', 'py.test', 'pytest-pypy'],