projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff02109
)
[lldbtest] Add an "expected_cmd_failure" option to the filecheck helper
author
Vedant Kumar
<vsk@apple.com>
Tue, 10 Sep 2019 18:36:53 +0000
(18:36 +0000)
committer
Vedant Kumar
<vsk@apple.com>
Tue, 10 Sep 2019 18:36:53 +0000
(18:36 +0000)
llvm-svn: 371544
lldb/packages/Python/lldbsuite/test/lldbtest.py
patch
|
blob
|
history
diff --git
a/lldb/packages/Python/lldbsuite/test/lldbtest.py
b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index
4b10331
..
313823b
100644
(file)
--- a/
lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/
lldb/packages/Python/lldbsuite/test/lldbtest.py
@@
-2207,12
+2207,16
@@
class TestBase(Base):
self,
command,
check_file,
- filecheck_options = ''):
+ filecheck_options = '',
+ expect_cmd_failure = False):
# Run the command.
self.runCmd(
command,
+ check=(not expect_cmd_failure),
msg="FileCheck'ing result of `{0}`".format(command))
+ self.assertTrue((not expect_cmd_failure) == self.res.Succeeded())
+
# Get the error text if there was an error, and the regular text if not.
output = self.res.GetOutput() if self.res.Succeeded() \
else self.res.GetError()