diff options
author | Vedant Kumar <vsk@apple.com> | 2019-09-10 18:36:53 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2019-09-10 18:36:53 +0000 |
commit | 3ef7dbd6650d53af79dedbfcd3c85a96b29c96bb (patch) | |
tree | 2fb01c895fc8e3a6608d164a1118c00b49be0956 /lldb/packages/Python/lldbsuite/test | |
parent | ff02109ad47af387839f3163168382273fcec05b (diff) | |
download | bcm5719-llvm-3ef7dbd6650d53af79dedbfcd3c85a96b29c96bb.tar.gz bcm5719-llvm-3ef7dbd6650d53af79dedbfcd3c85a96b29c96bb.zip |
[lldbtest] Add an "expected_cmd_failure" option to the filecheck helper
llvm-svn: 371544
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 4b10331d42c..313823b47f6 100644 --- 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() |