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.
This commit is contained in:
Michał Kępień 2025-10-25 07:37:48 +02:00
parent b494e02761
commit 85773d4d21
No known key found for this signature in database
4 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1 @@
@XMLLINT@

View file

@ -34,6 +34,7 @@ foreach name, prog : {
'PYTEST': pytest,
'PYTHON': python,
'SHELL': sh,
'XMLLINT': xmllint,
'XSLTPROC': xsltproc,
}
if prog.found()

View file

@ -48,6 +48,7 @@ def load_vars_from_build_files() -> Dict[str, str]:
"PYTHON",
"SHELL",
"TOP_SRCDIR",
"XMLLINT",
"XSLTPROC",
]:
var_file = var_dir / var

View file

@ -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'],