]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
cmake: Correctly handle cost data of tests with arbitrary chars in name
authorMoritz Haase <Moritz.Haase@bmw.de>
Tue, 17 Jun 2025 09:24:56 +0000 (11:24 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Jun 2025 20:54:41 +0000 (21:54 +0100)
commitdcbaf42dd74cc0bda7254856589613718ed3f057
treef24178f3c52bf0969ad47523d287ee19e3664591
parentf0d2374b94a0e5d60ceed17998cd97f85b0486f6
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 <john@drouhard.dev>
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/cmake/cmake-native_3.31.6.bb
meta/recipes-devtools/cmake/cmake/0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch [new file with mode: 0644]
meta/recipes-devtools/cmake/cmake_3.31.6.bb