2 # -*- coding: utf-8 -*-
9 def map_config(source_dir
, site_config
):
11 source_dir
= os
.path
.realpath(source_dir
)
12 source_dir
= os
.path
.normcase(source_dir
)
13 site_config
= os
.path
.normpath(site_config
)
14 config_map
[source_dir
] = site_config
16 # Variables configured at build time.
17 llvm_source_root
= "@LLVM_SOURCE_DIR@"
18 llvm_obj_root
= "@LLVM_BINARY_DIR@"
20 # Make sure we can find the lit package.
21 sys
.path
.insert(0, os
.path
.join(llvm_source_root
, 'utils', 'lit'))
23 # Set up some builtin parameters, so that by default the LLVM test suite
24 # configuration file knows how to find the object tree.
25 builtin_parameters
= { 'build_mode' : "@BUILD_MODE@" }
29 builtin_parameters
['config_map'] = config_map
31 if __name__
=='__main__':
32 from lit
.main
import main
33 main(builtin_parameters
)