[Lldb-commits] [PATCH] D105060: [LLDB] dotest.py set selected_platform on remote connection

Muhammad Omair Javaid via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 28 13:23:54 PDT 2021


omjavaid created this revision.
omjavaid added a reviewer: JDevlieghere.
omjavaid requested review of this revision.

This patch fixes a bug in dotest.py where lldb.selected_platform was
being set to host platform even after a successful connection to a
remote platform via platform url. This patch fixes this behavior and
sets selected_platform to remote_platform after a successful connection.

      

This patch also removes target_platform variable from run_suite.


https://reviews.llvm.org/D105060

Files:
  lldb/packages/Python/lldbsuite/test/dotest.py


Index: lldb/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest.py
+++ lldb/packages/Python/lldbsuite/test/dotest.py
@@ -929,6 +929,7 @@
             err = lldb.remote_platform.ConnectRemote(platform_connect_options)
             if err.Success():
                 print("Connected.")
+                lldb.selected_platform = lldb.remote_platform
             else:
                 print("error: failed to connect to remote platform using URL '%s': %s" % (
                     configuration.lldb_platform_url, err))
@@ -958,9 +959,6 @@
     # Note that it's not dotest's job to clean this directory.
     lldbutil.mkdir_p(configuration.test_build_dir)
 
-    from . import lldbplatformutil
-    target_platform = lldbplatformutil.getPlatform()
-
     checkLibcxxSupport()
     checkLibstdcxxSupport()
     checkWatchpointSupport()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105060.355015.patch
Type: text/x-patch
Size: 938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210628/aabd5f5f/attachment.bin>


More information about the lldb-commits mailing list