diff --git a/lldb/source/Commands/CommandObjectHealthcheck.cpp b/lldb/source/Commands/CommandObjectHealthcheck.cpp index 4c71af233216c..671b950f6c142 100644 --- a/lldb/source/Commands/CommandObjectHealthcheck.cpp +++ b/lldb/source/Commands/CommandObjectHealthcheck.cpp @@ -13,6 +13,7 @@ #include "lldb/Host/HostInfo.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Utility/Log.h" +#include "lldb/lldb-enumerations.h" #include "lldb/lldb-private.h" #include "Plugins/Language/Swift/LogChannelSwift.h" @@ -55,6 +56,8 @@ void CommandObjectHealthcheck::DoExecute(Args &args, result.AppendMessageWithFormat("Health check written to %s\n", temp_path.c_str()); + result.SetStatus(lldb::eReturnStatusSuccessFinishResult); + #if defined(__APPLE__) // When in an interactive graphical session and not, for example, // running LLDB running over ssh, open the log file straight away in diff --git a/lldb/test/API/lang/swift/swift-healthcheck/TestSwiftHealthCheck.py b/lldb/test/API/lang/swift/swift-healthcheck/TestSwiftHealthCheck.py index b2fec3c936b36..8ffe31a0e960d 100644 --- a/lldb/test/API/lang/swift/swift-healthcheck/TestSwiftHealthCheck.py +++ b/lldb/test/API/lang/swift/swift-healthcheck/TestSwiftHealthCheck.py @@ -20,7 +20,8 @@ def test_run_healthcheck(self): self, 'main') self.expect("expression 1") result = lldb.SBCommandReturnObject() - ret_val = self.dbg.GetCommandInterpreter().HandleCommand("swift-healthcheck", result) + ret_val = self.ci.HandleCommand("swift-healthcheck", result) + self.assertEqual(ret_val, lldb.eReturnStatusSuccessFinishResult) log = result.GetOutput()[:-1].split(" ")[-1] self.assertEqual(log[-4:], ".log") import io, re