From 0d36b657b9771e6013e1e83e567d80003631766e Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Thu, 21 Sep 2017 21:27:31 +0000 Subject: [lit] Refactor out some more common lit configuration code. debuginfo-tests has need to reuse a lot of common configuration from clang and lld, and in general it seems like all of the projects which are tightly coupled (e.g. lld, clang, llvm, lldb, etc) can benefit from knowing about one other. For example, lldb needs to know various things about how to run clang in its test suite. Since there's a lot of common substitutions and operations that need to be shared among projects, sinking this up into LLVM makes sense. In addition, this patch introduces a function add_tool_substitution which handles all the dirty intricacies of matching tool names which was previously copied around the various config files. This is now a simple straightforward interface which is hard to mess up. Differential Revision: https://reviews.llvm.org/D37944 llvm-svn: 313919 --- llvm/test/lit.cfg.py | 128 ++++++++++++--------------------------------------- 1 file changed, 30 insertions(+), 98 deletions(-) (limited to 'llvm/test/lit.cfg.py') diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py index 87e2a06e387..28e770d6308 100644 --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -11,6 +11,7 @@ import subprocess import lit.util import lit.formats from lit.llvm import llvm_config +from lit.llvm import ToolFilter # name: The name of this test suite. config.name = 'LLVM' @@ -134,108 +135,39 @@ else: # The regex is a pre-assertion to avoid matching a preceding # dot, hyphen, carat, or slash (.foo, -foo, etc.). Some patterns # also have a post-assertion to not match a trailing hyphen (foo-). -NOJUNK = r"(?