aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2024-10-10 08:11:05 +0700
committerGitHub <noreply@github.com>2024-10-09 18:11:05 -0700
commit68a5f5db7c970d22dc40637d7951b627fa50d5c1 (patch)
tree00d1e372cf82f1bb0ccfd96c4531c7170dca4edc /lldb/test/API/python_api
parent756ec99c3629b433d803022d6d33e01d2ecd34a0 (diff)
downloadllvm-68a5f5db7c970d22dc40637d7951b627fa50d5c1.zip
llvm-68a5f5db7c970d22dc40637d7951b627fa50d5c1.tar.gz
llvm-68a5f5db7c970d22dc40637d7951b627fa50d5c1.tar.bz2
[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.
Diffstat (limited to 'lldb/test/API/python_api')
-rw-r--r--lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py b/lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py
index ccefc28..5dd268b 100644
--- a/lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py
+++ b/lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py
@@ -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