2015-02-14 15:11:25 +08:00
|
|
|
#!/usr/bin/env python
|
2019-01-15 04:02:11 +08:00
|
|
|
# -*- coding: utf-8 -*-
|
2010-08-02 08:39:42 +08:00
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2017-09-16 06:10:46 +08:00
|
|
|
config_map = {}
|
|
|
|
|
|
|
|
def map_config(source_dir, site_config):
|
|
|
|
global config_map
|
2017-09-19 07:36:35 +08:00
|
|
|
source_dir = os.path.realpath(source_dir)
|
2017-09-16 06:10:46 +08:00
|
|
|
site_config = os.path.normpath(site_config)
|
2020-04-14 08:12:51 +08:00
|
|
|
config_map[os.path.normcase(source_dir)] = source_dir, site_config
|
2017-09-16 06:10:46 +08:00
|
|
|
|
2010-08-02 08:39:42 +08: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 06:10:46 +08:00
|
|
|
builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
|
|
|
|
|
|
|
|
@LLVM_LIT_CONFIG_MAP@
|
|
|
|
|
|
|
|
builtin_parameters['config_map'] = config_map
|
2017-01-17 15:10:55 +08:00
|
|
|
|
2020-04-07 08:38:26 +08:00
|
|
|
# Make sure we can find the lit package.
|
|
|
|
llvm_source_root = path("@LLVM_SOURCE_DIR@")
|
|
|
|
sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
|
|
|
|
|
2010-08-02 08:39:42 +08:00
|
|
|
if __name__=='__main__':
|
2016-10-11 07:02:42 +08:00
|
|
|
from lit.main import main
|
|
|
|
main(builtin_parameters)
|