From: Adrian Freihofer <[email protected]> The shared sysroot test of devtool ide-sdk adds a cmake-kit with the path of the temporary test build directory to ~/.local/share/CMakeTools. Every test run adds another stale kit, which is never removed again. Use a temporary XDG_DATA_HOME for the test, and verify that the kit is added there.
Signed-off-by: Adrian Freihofer <[email protected]> --- meta/lib/oeqa/selftest/cases/devtool.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index b848623a6e..e95de98e80 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -4564,9 +4564,14 @@ class DevtoolIdeSdkSharedTests(DevtoolIdeSdkTests): # Handle the workspace (which is not needed by this test case) self._check_workspace() + # Do not add a cmake-kit to the kits of the user + xdg_data_home = tempfile.mkdtemp(prefix='devtoolqa') + self.track_for_cleanup(xdg_data_home) + ide_env = dict(os.environ, XDG_DATA_HOME=xdg_data_home) + result_init = runCmd( 'devtool ide-sdk -m shared oe-selftest-image cmake-example meson-example --ide=code', - output_log=self._cmd_logger) + output_log=self._cmd_logger, env=ide_env) bb_vars = get_bb_vars( ['REAL_MULTIMACH_TARGET_SYS', 'DEPLOY_DIR_IMAGE', 'COREBASE'], "meta-ide-support") environment_script = 'environment-setup-%s' % bb_vars['REAL_MULTIMACH_TARGET_SYS'] @@ -4578,6 +4583,11 @@ class DevtoolIdeSdkSharedTests(DevtoolIdeSdkTests): # Verify the cross environment script is available self.assertExists(environment_script_path) + # Verify the cmake-kit is added to the location where CMake Tools looks for it + with open(os.path.join(xdg_data_home, 'CMakeTools', 'cmake-tools-kits.json')) as f: + kits = json.load(f) + self.assertEqual([kit['environmentSetupScript'] for kit in kits], [environment_script_path]) + def runCmdEnv(cmd, cwd, output_log=self._cmd_logger): cmd = '/bin/sh -c ". %s > /dev/null && %s"' % ( environment_script_path, cmd) -- 2.56.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#248626): https://lists.openembedded.org/g/openembedded-core/message/248626 Mute This Topic: https://lists.openembedded.org/mt/121932223/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
