Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,26 @@ if (EXISTS ${XMLLINT_EXE})
)
# typical output: "/usr/bin/xmllint: using libxml version 20913\ncompiled with: ..."
# version is formatted as a single integer, with 20913 representing 2.9.13
string(REGEX MATCH "using libxml version [0-9]+" XMLLINT_VERSION_STRING ${XMLLINT_VERSION_OUTPUT})
string(REPLACE "using libxml version " "" XMLLINT_VERSION ${XMLLINT_VERSION_STRING})
# schema test is broken with very new versions of xmllint
# https://github.com/gazebosim/sdformat/issues/1656
# enable schema test if xmllint is older than 2.15.0
if("${XMLLINT_VERSION}" LESS 21500)
string(REGEX MATCH "using libxml version [0-9]+" XMLLINT_VERSION_STRING "${XMLLINT_VERSION_OUTPUT}")
string(REPLACE "using libxml version " "" XMLLINT_VERSION "${XMLLINT_VERSION_STRING}")
if("${XMLLINT_VERSION}" STREQUAL "")
message(WARNING "Unable to identify xmllint version. schema_test won't be run")
elseif("${XMLLINT_VERSION}" LESS 10000)
message(WARNING "Old version of xmllint (${XMLLINT_VERSION_STRING}) detected. schema_test won't be run")
elseif("${XMLLINT_VERSION}" LESS 21500)
# schema test is broken with very new versions of xmllint
# https://github.com/gazebosim/sdformat/issues/1656
# enable schema test if xmllint is older than 2.15.0
set (tests ${tests} schema_test.cc)
else()
gz_build_warning("xmllint version is too new (${XMLLINT_VERSION}). schema_test won't be run")
# TODO: convert to WARNING when https://github.com/gazebosim/sdformat/issues/1656
# is resolved on supported platforms. It currently fails on Ubuntu 26.04
message(STATUS "WARNING: xmllint version (${XMLLINT_VERSION}) is too new; "
"schema_test won't be run. "
"See https://github.com/gazebosim/sdformat/issues/1656")
endif()
else()
gz_build_warning("xmllint not found. schema_test won't be run")
message(WARNING "xmllint not found. schema_test won't be run")
endif()

gz_build_tests(TYPE ${TEST_TYPE}
Expand Down
Loading