]> 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>
Fri, 20 Jun 2025 07:02:16 +0000 (09:02 +0200)
committerSteve Sakoman <steve@sakoman.com>
Fri, 20 Jun 2025 16:18:16 +0000 (09:18 -0700)
commitf6a160f7ea57af6dfeca003e6c05aa42419fb755
treeabf0db56d2b8c54e37134b477d2fcaf325a567a8
parent85a5d7b1d2c8600f30e38e034f828e5897d9a093
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 is a backport of f24178f3 (which itself backports the upstream fix).
the patch was adapted slightly to apply cleanly to the older CMake version in
kirkstone. 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>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/cmake/cmake-native_3.22.3.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.22.3.bb