[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user