2015-02-14 07:11:25 +00:00
|
|
|
#!/usr/bin/env python
|
2010-08-02 00:39:42 +00:00
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2017-09-15 22:10:46 +00:00
|
|
|
config_map = {}
|
|
|
|
|
|
|
|
def map_config(source_dir, site_config):
|
|
|
|
global config_map
|
2017-09-18 23:36:35 +00:00
|
|
|
source_dir = os.path.realpath(source_dir)
|
2017-09-21 21:27:11 +00:00
|
|
|
source_dir = os.path.normcase(source_dir)
|
2017-09-15 22:10:46 +00:00
|
|
|
site_config = os.path.normpath(site_config)
|
|
|
|
config_map[source_dir] = site_config
|
|
|
|
|
2010-08-02 00:39:42 +00:00
|
|
|
# Variables configured at build time.
|
|
|
|
llvm_source_root = "@LLVM_SOURCE_DIR@"
|
|
|
|
llvm_obj_root = "@LLVM_BINARY_DIR@"
|
|
|
|
|
|
|
|
# Make sure we can find the lit package.
|
2012-04-19 16:31:08 +00:00
|
|
|
sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
|
2010-08-02 00:39:42 +00:00
|
|
|
|
|
|
|
# Set up some builtin parameters, so that by default the LLVM test suite
|
|
|
|
# configuration file knows how to find the object tree.
|
2017-09-15 22:10:46 +00:00
|
|
|
builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
|
|
|
|
|
|
|
|
@LLVM_LIT_CONFIG_MAP@
|
|
|
|
|
|
|
|
builtin_parameters['config_map'] = config_map
|
2017-01-17 07:10:55 +00:00
|
|
|
|
2010-08-02 00:39:42 +00:00
|
|
|
if __name__=='__main__':
|
2016-10-10 23:02:42 +00:00
|
|
|
from lit.main import main
|
|
|
|
main(builtin_parameters)
|