summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2018-08-09 15:29:32 +0000
committerRaphael Isemann <teemperor@gmail.com>2018-08-09 15:29:32 +0000
commit879c1421301af0880d711320bcc0df0d911b16a8 (patch)
tree3941b8d3312f8452999f86fc40df648a9aa81618 /lldb/packages/Python
parentc8b782cec2da3b323036eba15850234b7e5427dd (diff)
downloadbcm5719-llvm-879c1421301af0880d711320bcc0df0d911b16a8.tar.gz
bcm5719-llvm-879c1421301af0880d711320bcc0df0d911b16a8.zip
Also display the output and error output of a failed command
Summary: Instead of just printing the current "False is not True, ..." message when we fail to run a certain command, this patch also adds the actual command output or error output that we received to the assertion message. Reviewers: davide Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D50492 llvm-svn: 339351
Diffstat (limited to 'lldb/packages/Python')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 1b6302ae96a..1c8b1d6bc22 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -2074,8 +2074,13 @@ class TestBase(Base):
print("Command '" + cmd + "' failed!", file=sbuf)
if check:
+ output = ""
+ if self.res.GetOutput():
+ output += "\nCommand output:\n" + self.res.GetOutput()
+ if self.res.GetError():
+ output += "\nError output:\n" + self.res.GetError()
self.assertTrue(self.res.Succeeded(),
- msg if msg else CMD_MSG(cmd))
+ msg if (msg + output) else CMD_MSG(cmd + output))
def match(
self,
OpenPOWER on IntegriCloud