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 # Set up some builtin parameters, so that by default the LLVM test suite
17 # configuration file knows how to find the object tree.
18 builtin_parameters = { 'build_mode' : '@BUILD_MODE@' }
22 builtin_parameters['config_map'] = config_map
24 # Make sure we can find the lit package.
25 llvm_source_root = path(r'@LLVM_SOURCE_DIR@')
26 sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
28 if __name__=='__main__':
29 from lit.main import main
30 main(builtin_parameters)