forked from carbon-language/carbon-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lit.cfg.py
42 lines (34 loc) · 1.04 KB
/
lit.cfg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
__copyright__ = """
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""
import lit.formats
import os
# This is a provided variable, ignore the undefined name warning.
config = config # noqa: F821
def fullpath(relative_path):
return os.path.join(os.environ["TEST_SRCDIR"], relative_path)
config.name = "lit"
config.suffixes = [".carbon"]
config.test_format = lit.formats.ShTest()
config.substitutions.append(
("%{prelude}", fullpath("carbon/explorer/data/prelude.carbon"))
)
config.substitutions.append(
(
"%{explorer}",
"%s --prelude=%s"
% (
fullpath("carbon/explorer/explorer"),
fullpath("carbon/explorer/data/prelude.carbon"),
),
)
)
config.substitutions.append(("%{not}", fullpath("llvm-project/llvm/not")))
config.substitutions.append(
(
"%{FileCheck}",
fullpath("llvm-project/llvm/FileCheck --dump-input-filter=all"),
)
)