From 23e9203ee0f5fa667f9c634bb754df7b4a43b665 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 12 May 2026 10:49:25 -0700 Subject: [PATCH 1/3] Unhide warning when schema test is skipped Signed-off-by: Steve Peters --- test/integration/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index 6c6ee3cbc..1e74fc473 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -86,10 +86,10 @@ if (EXISTS ${XMLLINT_EXE}) if("${XMLLINT_VERSION}" LESS 21500) set (tests ${tests} schema_test.cc) else() - gz_build_warning("xmllint version is too new (${XMLLINT_VERSION}). schema_test won't be run") + message(WARNING "xmllint version is too new (${XMLLINT_VERSION}). schema_test won't be run") 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} From 9bd336910b78f6b7f9850ff7713f59c16c62a7e2 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 13 Aug 2026 18:04:56 -0700 Subject: [PATCH 2/3] Convert WARNING to STATUS message to fix CI Add TODO with link to bug to convert back to WARNING when bug is fixed on Ubuntu 26.04 Signed-off-by: Steve Peters --- test/integration/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index 1e74fc473..d513a0bc7 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -86,7 +86,11 @@ if (EXISTS ${XMLLINT_EXE}) if("${XMLLINT_VERSION}" LESS 21500) set (tests ${tests} schema_test.cc) else() - message(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() message(WARNING "xmllint not found. schema_test won't be run") From 271cec17dd23d469b8d977a6f52318787281a1b2 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 13 Aug 2026 18:06:05 -0700 Subject: [PATCH 3/3] Clean up xmllint version parsing logic * Quote string variables in case they are empty * Warn on empty version string * Warn on version string below 10000 to handle dot-decimal strings such as 2.15.1 instead of 21501 Signed-off-by: Steve Peters --- test/integration/CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index d513a0bc7..afaa83ad2 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -78,12 +78,16 @@ 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() # TODO: convert to WARNING when https://github.com/gazebosim/sdformat/issues/1656