bbli created this revision. bbli added a reviewer: labath. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
This patch will add printing of the output of stdout during compile errors, right below output of stderr. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D83425 Files: lldb/packages/Python/lldbsuite/test_event/build_exception.py Index: lldb/packages/Python/lldbsuite/test_event/build_exception.py =================================================================== --- lldb/packages/Python/lldbsuite/test_event/build_exception.py +++ lldb/packages/Python/lldbsuite/test_event/build_exception.py @@ -4,13 +4,14 @@ super(BuildError, self).__init__("Error when building test subject") self.command = called_process_error.lldb_extensions.get( "command", "<command unavailable>") - self.build_error = called_process_error.lldb_extensions.get( + self.stderr = called_process_error.lldb_extensions.get( "stderr_content", "<error output unavailable>") + self.stdout = called_process_error.lldb_extensions.get("stdout_content","<stdout output unavailable>") def __str__(self): - return self.format_build_error(self.command, self.build_error) + return self.format_build_error(self.command, self.stderr, self.stdout) @staticmethod - def format_build_error(command, command_output): + def format_build_error(command, stderr_output, stdout_output): return "Error when building test subject.\n\nBuild Command:\n{}\n\nBuild Command Output:\n{}".format( - command, command_output.decode("utf-8")) + command, stderr_output.decode("utf-8")+ stdout_output.decode("utf-8"))
Index: lldb/packages/Python/lldbsuite/test_event/build_exception.py =================================================================== --- lldb/packages/Python/lldbsuite/test_event/build_exception.py +++ lldb/packages/Python/lldbsuite/test_event/build_exception.py @@ -4,13 +4,14 @@ super(BuildError, self).__init__("Error when building test subject") self.command = called_process_error.lldb_extensions.get( "command", "<command unavailable>") - self.build_error = called_process_error.lldb_extensions.get( + self.stderr = called_process_error.lldb_extensions.get( "stderr_content", "<error output unavailable>") + self.stdout = called_process_error.lldb_extensions.get("stdout_content","<stdout output unavailable>") def __str__(self): - return self.format_build_error(self.command, self.build_error) + return self.format_build_error(self.command, self.stderr, self.stdout) @staticmethod - def format_build_error(command, command_output): + def format_build_error(command, stderr_output, stdout_output): return "Error when building test subject.\n\nBuild Command:\n{}\n\nBuild Command Output:\n{}".format( - command, command_output.decode("utf-8")) + command, stderr_output.decode("utf-8")+ stdout_output.decode("utf-8"))
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits