[Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

Ying Chen via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 18 11:06:06 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL253488: Support unix-abstract-connect scheme as platform url in lldb testsuite (authored by chying).

Changed prior to commit:
  http://reviews.llvm.org/D14765?vs=40469&id=40535#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14765

Files:
  lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
  lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Index: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,11 @@
         assert lldb.platform_url is not None
         device_id = None
         parsed_url = urlparse.urlparse(lldb.platform_url)
-        if parsed_url.scheme == "adb":
-            device_id = parsed_url.netloc.split(":")[0]
+        host_name = parsed_url.netloc.split(":")[0]
+        if host_name != 'localhost':
+            device_id = host_name
+            if device_id.startswith('[') and device_id.endswith(']'):
+                device_id = device_id[1:-1]
         retcode, stdout, stderr = run_adb_command(
             ["shell", "getprop", "ro.build.version.sdk"], device_id)
         if retcode == 0:
Index: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
         self.named_pipe_fd = None
         self.stub_sends_two_stop_notifications_on_kill = False
         if lldb.platform_url:
-            scheme, host = re.match('(.+)://(.+):\d+', lldb.platform_url).groups()
-            if scheme == 'adb':
+            if lldb.platform_url.startswith('unix-'):
+                url_pattern = '(.+)://\[?(.+?)\]?/.*'
+            else:
+                url_pattern = '(.+)://(.+):\d+'
+            scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+            if lldb.remote_platform_name == 'remote-android' and host != 'localhost':
                 self.stub_device = host
                 self.stub_hostname = 'localhost'
             else:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14765.40535.patch
Type: text/x-patch
Size: 1932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151118/1270818f/attachment.bin>


More information about the lldb-commits mailing list