From 9b13bea61a576a41eda7c88d1628f9914bfc02b4 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Tue, 18 Sep 2018 19:31:47 +0000 Subject: 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 --- lldb/packages/Python/lldbsuite/test/dotest.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py') 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 -- cgit v1.1