brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 52f81bf Raw
34 lines · python
1import os2 3import lit.llvm4 5lit.llvm.initialize(lit_config, config)6lit.llvm.llvm_config.use_default_substitutions()7 8# TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites.9# See https://github.com/llvm/llvm-project/issues/106636 for more details.10#11# We prefer the lit internal shell which provides a better user experience on failures12# and is faster unless the user explicitly disables it with LIT_USE_INTERNAL_SHELL=013# env var.14use_lit_shell = True15lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")16if lit_shell_env:17    use_lit_shell = lit.util.pythonize_bool(lit_shell_env)18 19config.name = "ClangIncludeCleaner"20config.suffixes = [".test", ".c", ".cpp"]21config.excludes = ["Inputs"]22config.test_format = lit.formats.ShTest(not use_lit_shell)23config.test_source_root = config.clang_include_cleaner_source_dir + "/test"24config.test_exec_root = config.clang_include_cleaner_binary_dir + "/test"25 26config.environment["PATH"] = os.path.pathsep.join(27    (config.clang_tools_dir, config.llvm_tools_dir, config.environment["PATH"])28)29 30# It is not realistically possible to account for all options that could31# possibly be present in system and user configuration files, so disable32# default configs for the test runs.33config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"34