Skip to content

Commit 68a5f5d

Browse files
authored
[lldb] Fix TestGlobalModuleCache.py for remote debugging (llvm#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.
1 parent 756ec99 commit 68a5f5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def do_test(self, one_target, one_debugger):
111111
else:
112112
if one_target:
113113
new_debugger = lldb.SBDebugger().Create()
114+
new_debugger.SetSelectedPlatform(lldb.selected_platform)
114115
new_debugger.SetAsync(False)
115116
self.old_debugger = self.dbg
116117
self.dbg = new_debugger

0 commit comments

Comments
 (0)