2015-02-14 08:11:25 +01:00
|
|
|
#!/usr/bin/env python
|
2010-08-02 02:39:42 +02:00
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2017-09-16 00:10:46 +02:00
|
|
|
config_map = {}
|
|
|
|
|
|
|
|
def map_config(source_dir, site_config):
|
|
|
|
global config_map
|
2017-09-19 01:36:35 +02:00
|
|
|
source_dir = os.path.realpath(source_dir)
|
2017-09-21 23:27:11 +02:00
|
|
|
source_dir = os.path.normcase(source_dir)
|
2017-09-16 00:10:46 +02:00
|
|
|
site_config = os.path.normpath(site_config)
|
|
|
|
config_map[source_dir] = site_config
|
|
|
|
|
2010-08-02 02:39:42 +02: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 18:31:08 +02:00
|
|
|
sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
|
2010-08-02 02:39:42 +02: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-16 00:10:46 +02:00
|
|
|
builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
|
|
|
|
|
|
|
|
@LLVM_LIT_CONFIG_MAP@
|
|
|
|
|
|
|
|
builtin_parameters['config_map'] = config_map
|
2017-01-17 08:10:55 +01:00
|
|
|
|
2010-08-02 02:39:42 +02:00
|
|
|
if __name__=='__main__':
|
2016-10-11 01:02:42 +02:00
|
|
|
from lit.main import main
|
|
|
|
main(builtin_parameters)
|