diff options
| -rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py | 8 | ||||
| -rw-r--r-- | lldb/source/API/SBPlatform.cpp | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py b/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py index 54ea33ad24a..b81446f5a58 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py @@ -51,6 +51,14 @@ class PlatformPythonTestCase(TestBase): @add_test_categories(['pyapi']) @no_debug_info_test + def test_host_is_connected(self): + # We've already tested that this one IS the host platform. + host_platform = self.dbg.GetPlatformAtIndex(0) + self.assertTrue(host_platform.IsConnected(), "The host platform is always connected") + + + @add_test_categories(['pyapi']) + @no_debug_info_test def test_available_platform_list(self): """Test SBDebugger::GetNumAvailablePlatforms() and GetAvailablePlatformInfoAtIndex() API""" num_platforms = self.dbg.GetNumAvailablePlatforms() diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp index d7715e44e46..ef06dd21834 100644 --- a/lldb/source/API/SBPlatform.cpp +++ b/lldb/source/API/SBPlatform.cpp @@ -271,7 +271,7 @@ void SBPlatform::DisconnectRemote() { bool SBPlatform::IsConnected() { PlatformSP platform_sp(GetSP()); if (platform_sp) - platform_sp->IsConnected(); + return platform_sp->IsConnected(); return false; } |

