[lldb] Fix TestGlobalModuleCache.py for remote debugging (#111483)

`SBDebugger().Create()` returns a debugger with only the host platform
in its platform list. If the test suite is running for a remote
platform, it should be explicitly added and selected in the new debugger
created within the test, otherwise, the test will fail because the host
platform may not be able to launch the built binary.
This commit is contained in:
Igor Kudrin
2024-10-10 08:11:05 +07:00
committed by GitHub
parent 756ec99c36
commit 68a5f5db7c

View File

@@ -111,6 +111,7 @@ class GlobalModuleCacheTestCase(TestBase):
else:
if one_target:
new_debugger = lldb.SBDebugger().Create()
new_debugger.SetSelectedPlatform(lldb.selected_platform)
new_debugger.SetAsync(False)
self.old_debugger = self.dbg
self.dbg = new_debugger