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
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,