annotate utils/llvm-lit/llvm-lit.in @ 147:c2174574ed3a

LLVM 10
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 16:55:33 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #!/usr/bin/env python
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
2 # -*- coding: utf-8 -*-
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 import os
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 import sys
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
121
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
7 config_map = {}
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
8
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
9 def map_config(source_dir, site_config):
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
10 global config_map
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
11 source_dir = os.path.realpath(source_dir)
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
12 source_dir = os.path.normcase(source_dir)
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
13 site_config = os.path.normpath(site_config)
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
14 config_map[source_dir] = site_config
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
15
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 # Variables configured at build time.
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 llvm_source_root = "@LLVM_SOURCE_DIR@"
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 llvm_obj_root = "@LLVM_BINARY_DIR@"
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 # Make sure we can find the lit package.
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 # Set up some builtin parameters, so that by default the LLVM test suite
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 # configuration file knows how to find the object tree.
121
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
25 builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
121
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
27 @LLVM_LIT_CONFIG_MAP@
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
121
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
29 builtin_parameters['config_map'] = config_map
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
30
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 if __name__=='__main__':
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 77
diff changeset
32 from lit.main import main
1172e4bd9c6f update 4.0.0
mir3636
parents: 77
diff changeset
33 main(builtin_parameters)