xref: /llvm-project/clang/test/Analysis/scan-build/lit.local.cfg (revision 2868e26d0a6f257d3a8f303c7918f37c690e35a4)
1# -*- Python -*-
2
3import lit.formats
4import os
5import platform
6
7use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
8config.test_format = lit.formats.ShTest(use_lit_shell == "0")
9
10clang_path = config.clang if config.have_llvm_driver else os.path.realpath(config.clang)
11
12config.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    )
24)
25
26if not config.perl_executable or platform.system() == "Windows":
27    config.unsupported = True
28