[all-commits] [llvm/llvm-project] 9f18f3: [lldb] Improve test failure reporting for expect()
David Spickett via All-commits
all-commits at lists.llvm.org
Thu Sep 3 05:35:27 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 9f18f3c858d5ff8154701a50c2be6f7b19667a1d
https://github.com/llvm/llvm-project/commit/9f18f3c858d5ff8154701a50c2be6f7b19667a1d
Author: David Spickett <david.spickett at linaro.org>
Date: 2020-09-03 (Thu, 03 Sep 2020)
Changed paths:
M lldb/packages/Python/lldbsuite/test/lldbtest.py
A lldb/test/API/assert_messages_test/TestAssertMessages.py
Log Message:
-----------
[lldb] Improve test failure reporting for expect()
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.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D86792
More information about the All-commits
mailing list