cmake: Correctly handle cost data of tests with arbitrary chars in name
PATCH 1/1 cmake: Correctly handle cost data of tests with arbitrary chars in name
ctest automatically optimizes the order of (parallel) test execution based on historic test case runtime via the COST property (see [0]), which can have a significant impact on overall test run times. Sadly this feature is broken in CMake < 4.0.0 for test cases that have spaces in their name (see [1]).
This commit backports the upstream fix. As repeated test runs are expected to mainly take place inside the SDK, the patch is only applied to 'nativesdk' builds.
[0]: https://cmake.org/cmake/help/latest/prop_test/COST.html
[1]: https://gitlab.kitware.com/cmake/cmake/-/issues/26594
Reported-By John Drouhard <[email protected]>
Signed-off-by Moritz Haase <[email protected]>
--- .../cmake/cmake-native_3.31.6.bb | 2 +- ...trary-characters-in-test-names-of-CT.patch | 202 ++++++++++++++++++ meta/recipes-devtools/cmake/cmake_3.31.6.bb | 1 + 3 files changed, 204 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/cmake/cmake/0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch
meta/recipes-devtools/cmake/cmake-native_3.31.6.bb +1 -1
@@ -51,7 +51,7 @@ do_compile() { do_install() { oe_runmake 'DESTDIR=${D}' install - # The following codes are here because eSDK needs to provide compatibilty + # The following codes are here because eSDK needs to provide compatibility # for SDK. That is, eSDK could also be used like traditional SDK. mkdir -p ${D}${datadir}/cmake install -m 644 ${UNPACKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
meta/recipes-devtools/cmake/cmake/0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch new file +202 -0
202 lines not on this page · raw message
meta/recipes-devtools/cmake/cmake_3.31.6.bb +1 -0
@@ -5,6 +5,7 @@ inherit cmake bash-completion DEPENDS += "curl expat zlib libarchive xz ncurses bzip2" SRC_URI:append:class-nativesdk = " \ + file://0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch \ file://OEToolchainConfig.cmake \ file://SDKToolchainConfig.cmake.template \ file://cmake-setup.py \