From: Adrian Freihofer Date: Mon, 23 Feb 2026 21:06:35 +0000 (+0100) Subject: oe-selftest: devtool: improve test_devtool_ide_sdk_shared_sysroots X-Git-Tag: uninative-5.1~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e13ba36abeeec08bda1082693fa03f5d863ac0dc;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git oe-selftest: devtool: improve test_devtool_ide_sdk_shared_sysroots In shared-sysroot IDE SDK mode, the C++ CMake example test ran CMake commands but did not assert that configure/build completed successfully. This could hide failures and produce false positives. Capture command output from both steps and assert expected messages: - configure: "Build files have been written to: " - build: "Built target" This makes the test explicitly fail when CMake configure or build does not complete as expected. Signed-off-by: Adrian Freihofer Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index ade79c881e..aa9ee73d08 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -3354,8 +3354,12 @@ class DevtoolIdeSdkTests(DevtoolBase): cmake_native = os.path.normpath(result_cmake.output.strip()) self.assertExists(cmake_native) - runCmdEnv('cmake %s' % cpp_example_src, cwd=tempdir_cmake, output_log=self._cmd_logger) - runCmdEnv('cmake --build %s' % tempdir_cmake, cwd=tempdir_cmake, output_log=self._cmd_logger) + result_cmake = runCmdEnv('cmake -S %s -B %s' % (cpp_example_src, tempdir_cmake), + cwd=tempdir_cmake, output_log=self._cmd_logger) + self.assertIn("Build files have been written to: %s" % tempdir_cmake, result_cmake.output) + result_cmake = runCmdEnv('cmake --build %s' % tempdir_cmake, + cwd=tempdir_cmake, output_log=self._cmd_logger) + self.assertIn("Built target", result_cmake.output) # Verify the printed note really referres to a cmake executable cmake_native_code = ""