diff options
author | Zachary Turner <zturner@google.com> | 2017-11-10 20:57:57 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-11-10 20:57:57 +0000 |
commit | 0f2ce11df7288c4cdae0db2f7211ec41446e6c22 (patch) | |
tree | dcb05a278762dcb31288cbbca159cbfdf9c6b44b /debuginfo-tests/lit.cfg.py | |
parent | f59d0715b1581d627eab52e03f81dcb6c4f9c008 (diff) | |
download | bcm5719-llvm-0f2ce11df7288c4cdae0db2f7211ec41446e6c22.tar.gz bcm5719-llvm-0f2ce11df7288c4cdae0db2f7211ec41446e6c22.zip |
[debuginfo-tests] Make debuginfo-tests work in a standard configuration.
Previously, debuginfo-tests was expected to be checked out into
clang/test and then the tests would automatically run as part of
check-clang. This is not a standard workflow for handling
external projects, and it brings with it some serious drawbacks
such as the inability to depend on things other than clang, which
we will need going forward.
The goal of this patch is to migrate towards a more standard
workflow. To ease the transition for build bot maintainers,
this patch tries not to break the existing workflow, but instead
simply deprecate it to give maintainers a chance to update
the build infrastructure.
Differential Revision: https://reviews.llvm.org/D39605
llvm-svn: 317925
Diffstat (limited to 'debuginfo-tests/lit.cfg.py')
-rw-r--r-- | debuginfo-tests/lit.cfg.py | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/debuginfo-tests/lit.cfg.py b/debuginfo-tests/lit.cfg.py new file mode 100644 index 00000000000..b56aa42d00c --- /dev/null +++ b/debuginfo-tests/lit.cfg.py @@ -0,0 +1,57 @@ +# -*- Python -*- + +import os +import platform +import re +import subprocess +import tempfile + +import lit.formats +import lit.util + +from lit.llvm import llvm_config +from lit.llvm.subst import ToolSubst +from lit.llvm.subst import FindTool + +# Configuration file for the 'lit' test runner. + +# name: The name of this test suite. +config.name = 'debuginfo-tests' + +# testFormat: The test format to use to interpret tests. +# +# For now we require '&&' between commands, until they get globally killed and +# the test runner updated. +config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell) + +# suffixes: A list of file extensions to treat as test files. +config.suffixes = ['.c', '.cpp', '.m'] + +# excludes: A list of directories to exclude from the testsuite. The 'Inputs' +# subdirectories contain auxiliary inputs for various tests in their parent +# directories. +config.excludes = ['Inputs'] + +# test_source_root: The root path where tests are located. +config.test_source_root = os.path.join(config.debuginfo_tests_src_root, 'tests') + +# test_exec_root: The root path where tests should be run. +config.test_exec_root = config.debuginfo_tests_obj_root + +llvm_config.use_default_substitutions() + +llvm_config.use_clang() + +if config.llvm_use_sanitizer: + # Propagate path to symbolizer for ASan/MSan. + llvm_config.with_system_environment( + ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']) + +tool_dirs = [config.llvm_tools_dir] + +tools = [ + ToolSubst('%test_debuginfo', command=os.path.join( + config.llvm_src_root, 'utils', 'test_debuginfo.pl')), +] + +llvm_config.add_tool_substitutions(tools, tool_dirs) |