[Lldb-commits] [lldb] r327448 - Add a missing return in SBPlatform::IsConnected and test
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 13 14:06:05 PDT 2018
Author: jingham
Date: Tue Mar 13 14:06:05 2018
New Revision: 327448
URL: http://llvm.org/viewvc/llvm-project?rev=327448&view=rev
Log:
Add a missing return in SBPlatform::IsConnected and test
for the behavior - using the fact that the Host platform
is always present & connected.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py
lldb/trunk/source/API/SBPlatform.cpp
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py?rev=327448&r1=327447&r2=327448&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py Tue Mar 13 14:06:05 2018
@@ -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()
Modified: lldb/trunk/source/API/SBPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBPlatform.cpp?rev=327448&r1=327447&r2=327448&view=diff
==============================================================================
--- lldb/trunk/source/API/SBPlatform.cpp (original)
+++ lldb/trunk/source/API/SBPlatform.cpp Tue Mar 13 14:06:05 2018
@@ -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;
}
More information about the lldb-commits
mailing list