mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
1e564b48a1
This has gone back and forth, but it seems this is necessary after all. realpath is not sufficient because if you have a file named 'C:\foo.txt', then both realpath('c:\foo.txt') and realpath(C:\foo.txt') return the string that was passed to them exactly as is, meaning the case of the drive-letter won't match. The problem before was not that we were normalizing the case of items going into the config map, but rather that we were normalizing the case of something we needed to print. The value that is used to key on the config map should never be printed. llvm-svn: 313918
33 lines
869 B
Python
Executable File
33 lines
869 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import os
|
|
import sys
|
|
|
|
config_map = {}
|
|
|
|
def map_config(source_dir, site_config):
|
|
global config_map
|
|
source_dir = os.path.realpath(source_dir)
|
|
source_dir = os.path.normcase(source_dir)
|
|
site_config = os.path.normpath(site_config)
|
|
config_map[source_dir] = site_config
|
|
|
|
# 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.
|
|
sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
|
|
|
|
# Set up some builtin parameters, so that by default the LLVM test suite
|
|
# configuration file knows how to find the object tree.
|
|
builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
|
|
|
|
@LLVM_LIT_CONFIG_MAP@
|
|
|
|
builtin_parameters['config_map'] = config_map
|
|
|
|
if __name__=='__main__':
|
|
from lit.main import main
|
|
main(builtin_parameters)
|