From: Adrian Freihofer <[email protected]>

Run the existing VS Code NFS debug-rootfs test with both modified and
shared modes enabled. Keep its image, recipe and debugger checks while
also asserting that the shared environment script and standalone sysroot
were generated.
Reuse the existing test instead of adding a separate combined-mode test.
---
 meta/lib/oeqa/selftest/cases/devtool.py | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index a6002ec2b6..265f2147a4 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -3612,7 +3612,7 @@ class DevtoolIdeSdkTests(DevtoolBase):
         """Verify a recipe's binary was extracted into the NFS debug rootfs."""
         self.assertExists(os.path.join(nfs_rootfs, 'usr', 'bin', example_exe))
 
-    def _test_code_nfs_debug_rootfs(self):
+    def _test_code_nfs_debug_rootfs(self, shared=False):
         """Verify ide-sdk extracts an NFS debug rootfs for VS Code 
debugging."""
         recipe_name = self._cmake_recipe_name
         build_file = "CMakeLists.txt"
@@ -3622,12 +3622,20 @@ class DevtoolIdeSdkTests(DevtoolBase):
         self._write_bb_config()
         tempdir = self._devtool_ide_sdk_recipe(
             recipe_name, build_file, testimage)
-        runCmd('devtool ide-sdk %s %s -c --ide=code --nfs=rootfs-dbg' %
-               (recipe_name, testimage), output_log=self._cmd_logger)
+        mode_opts = '-m modified -m shared ' if shared else ''
+        runCmd('devtool ide-sdk %s%s %s -c --ide=code --nfs=rootfs-dbg' %
+               (mode_opts, recipe_name, testimage), 
output_log=self._cmd_logger)
 
         nfs_rootfs, _ = self._verify_nfs_debug_rootfs(testimage, 'rootfs-dbg')
         self._verify_nfs_binary_deployed(nfs_rootfs, recipe_name)
         self._verify_nfs_launch_json(tempdir, nfs_rootfs)
+        if shared:
+            bb_vars = get_bb_vars(
+                ['REAL_MULTIMACH_TARGET_SYS', 'DEPLOY_DIR_IMAGE'], 
'meta-ide-support')
+            self.assertExists(os.path.join(
+                bb_vars['DEPLOY_DIR_IMAGE'],
+                'environment-setup-%s' % bb_vars['REAL_MULTIMACH_TARGET_SYS']))
+            self.assertExists(get_bb_var('STANDALONE_SYSROOT', 
'build-sysroots'))
 
     def _test_code_and_none_qemu(self, nfs=False, slirp=False):
         """Verify devtool ide-sdk --ide=code --ide=none for cmake, meson and 
the target toolchain.
@@ -4300,7 +4308,7 @@ class DevtoolIdeSdkGccTests(DevtoolIdeSdkTests):
 
     def test_code_nfs_debug_rootfs(self):
         """Verify ide-sdk extracts an NFS debug rootfs for VS Code 
debugging."""
-        self._test_code_nfs_debug_rootfs()
+        self._test_code_nfs_debug_rootfs(shared=True)
 
     @OETestTag("runqemu")
     def test_code_and_none_qemu(self):
-- 
2.55.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246703): 
https://lists.openembedded.org/g/openembedded-core/message/246703
Mute This Topic: https://lists.openembedded.org/mt/121458918/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to