Update gdbremote_testcase to accomodate new adb:// scheme.
authorChaoren Lin <chaorenl@google.com>
Wed, 6 May 2015 01:28:04 +0000 (01:28 +0000)
committerChaoren Lin <chaorenl@google.com>
Wed, 6 May 2015 01:28:04 +0000 (01:28 +0000)
Reviewers: chying, ovyalov

Reviewed By: chying, ovyalov

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9510

llvm-svn: 236560

lldb/test/tools/lldb-server/gdbremote_testcase.py

index 74c5fb8..81a794e 100644 (file)
@@ -61,7 +61,8 @@ class GdbRemoteTestCaseBase(TestBase):
         self.named_pipe_fd = None
         self.stub_sends_two_stop_notifications_on_kill = False
         if lldb.platform_url:
-            self.stub_hostname = re.match(".*://(.*):[0-9]+", lldb.platform_url).group(1)
+            scheme, host = re.match('(.+)://(.+):\d+', lldb.platform_url).groups()
+            self.stub_hostname = 'localhost' if scheme == 'adb' else host
         else:
             self.stub_hostname = "localhost"