diff options
author | Vedant Kumar <vsk@apple.com> | 2018-09-18 19:31:47 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2018-09-18 19:31:47 +0000 |
commit | 9b13bea61a576a41eda7c88d1628f9914bfc02b4 (patch) | |
tree | e3664f582263814503176f9237fa2a3b02b0f469 /lldb/packages/Python/lldbsuite/test/dotest.py | |
parent | ee679e10bbd2f9d66ecc04cac0678ffe7082f83a (diff) | |
download | llvm-9b13bea61a576a41eda7c88d1628f9914bfc02b4.zip llvm-9b13bea61a576a41eda7c88d1628f9914bfc02b4.tar.gz llvm-9b13bea61a576a41eda7c88d1628f9914bfc02b4.tar.bz2 |
Allow use of self.filecheck in LLDB tests (c.f self.expect)
Add a "filecheck" method to the LLDB test base. This allows test authors
to pattern match command output using FileCheck, making it possible to
write stricter tests than what `self.expect` allows.
For context (motivation, examples of stricter checking, etc), see the
lldb-dev thread: "Using FileCheck in lldb inline tests".
Differential Revision: https://reviews.llvm.org/D50751
llvm-svn: 342508
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index f0c5844..ab46628 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -307,6 +307,13 @@ def parseOptionsAndInitTestdirs(): os.environ['DSYMUTIL'] = seven.get_command_output( 'xcrun -find -toolchain default dsymutil') + if args.filecheck: + # The CMake build passes in a path to a working FileCheck binary. + configuration.filecheck = os.path.abspath(args.filecheck) + else: + logging.error('No valid FileCheck executable; aborting...') + sys.exit(-1) + if args.channels: lldbtest_config.channels = args.channels |