[lldb] Add platform select to TestProcessConnect.py
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 23 Nov 2020 23:10:46 +0000 (15:10 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 24 Nov 2020 02:02:00 +0000 (18:02 -0800)
Extend TestProcessConnect to cover the scenario fixed by
6c0cd5676e0a0feaf836e0399023a6e21224467b. This replaces
command-process-connect.test which would fail if port 4321
was open.

lldb/test/API/functionalities/gdb_remote_client/TestProcessConnect.py

index c2d06ad..80b83fb 100644 (file)
@@ -38,6 +38,8 @@ class TestProcessConnect(GDBRemoteTestBase):
         """Test the gdb-remote command in synchronous mode"""
         try:
             self.dbg.SetAsync(False)
+            self.expect("platform select remote-gdb-server",
+                        substrs=['Platform: remote-gdb-server', 'Connected: no'])
             self.expect("process connect connect://" +
                         self.server.get_connect_address(),
                         substrs=['Process', 'stopped'])
@@ -50,6 +52,8 @@ class TestProcessConnect(GDBRemoteTestBase):
         """Test the gdb-remote command in asynchronous mode"""
         try:
             self.dbg.SetAsync(True)
+            self.expect("platform select remote-gdb-server",
+                        substrs=['Platform: remote-gdb-server', 'Connected: no'])
             self.expect("process connect connect://" +
                         self.server.get_connect_address(),
                         matching=False,