Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / clang / test / Analysis / scan-build / lit.local.cfg
blobaed76ca0e8087db660f3d6c2f3bbac66333ea223
1 # -*- Python -*-
3 import lit.formats
4 import os
5 import platform
7 use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
8 config.test_format = lit.formats.ShTest(use_lit_shell == "0")
10 clang_path = config.clang if config.have_llvm_driver else os.path.realpath(config.clang)
12 config.substitutions.append(
13     (
14         "%scan-build",
15         "'%s' '%s' --use-analyzer=%s "
16         % (
17             config.perl_executable,
18             os.path.join(
19                 config.clang_src_dir, "tools", "scan-build", "bin", "scan-build"
20             ),
21             clang_path,
22         ),
23     )
26 if not config.perl_executable or platform.system() == "Windows":
27     config.unsupported = True