]> 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)
committerSteve Sakoman <steve@sakoman.com>
Fri, 20 Jun 2025 16:36:36 +0000 (09:36 -0700)
commitead0d06d6335fb74c1ae0dc7bdcf414c66b3e4ab
treebb0fc224306abd30703951a643c0a7e62e5fcf79
parent01842999c13f5ba5a020e7b5029a3bd059c18f4c
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>
(cherry picked from commit dcbaf42dd74cc0bda7254856589613718ed3f057)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
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