[Lldb-commits] [PATCH] D86792: [lldb] Improve test failure reporting for expect()
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 28 09:08:39 PDT 2020
DavidSpickett created this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
DavidSpickett requested review of this revision.
Herald added a subscriber: JDevlieghere.
This updates the errors reported by expect()
to something like:
'''
Ran command:
"help"
Got output:
Debugger commands:
<...>
Expecting start string: "Debugger commands:" (was found)
Expecting end string: "foo" (was not found)
'''
(see added tests for more examples)
This shows the user exactly what was run,
what checks passed and which failed. Along with
whether that check was supposed to pass.
(including what regex patterns matched)
These lines are also output to the test
trace file, whether the test passes or not.
Note that expect() will still fail at the first failed
check, in line with previous behaviour.
Also I have flipped the wording of the assert
message functions (.*_MSG) to describe failures
not successes. This makes more sense as they are
only shown on assert failures.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86792
Files:
lldb/packages/Python/lldbsuite/test/lldbtest.py
lldb/test/API/assert_messages_test/TestAssertMessages.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86792.288627.patch
Type: text/x-patch
Size: 11387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200828/bafcd2f9/attachment.bin>
More information about the lldb-commits
mailing list