[Lldb-commits] [lldb] 68a5f5d - [lldb] Fix TestGlobalModuleCache.py for remote debugging (#111483)

via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 9 18:11:09 PDT 2024


Author: Igor Kudrin
Date: 2024-10-09T18:11:05-07:00
New Revision: 68a5f5db7c970d22dc40637d7951b627fa50d5c1

URL: https://github.com/llvm/llvm-project/commit/68a5f5db7c970d22dc40637d7951b627fa50d5c1
DIFF: https://github.com/llvm/llvm-project/commit/68a5f5db7c970d22dc40637d7951b627fa50d5c1.diff

LOG: [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.

Added: 
    

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

Removed: 
    


################################################################################
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 ccefc28946e062..5dd268be4cb05f 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 @@ def do_test(self, one_target, one_debugger):
         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


        


More information about the lldb-commits mailing list