llvm.org GIT mirror llvm / 6b79819
[lit] Don't norm case when inserting into the config map. This makes all paths lowercase on Windows, which seemed like a good idea at the time, but it means that tests can't properly use FileCheck to match expected path names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313889 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 1 year, 11 months ago
5 changed file(s) with 3 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
5353 config_map = litConfig.params.get('config_map')
5454 if config_map:
5555 cfgpath = os.path.realpath(cfgpath)
56 cfgpath = os.path.normpath(cfgpath)
57 cfgpath = os.path.normcase(cfgpath)
5856 target = config_map.get(cfgpath)
5957 if target:
6058 cfgpath = target
33
44 main_config = sys.argv[1]
55
6 config_map = {lit.util.norm_path(main_config) : sys.argv[2]}
6 config_map = {os.path.realpath(main_config) : sys.argv[2]}
77 builtin_parameters = {'config_map' : config_map}
88
99 if __name__=='__main__':
44 config.test_format = lit.formats.ShTest()
55
66 import os
7 config.test_exec_root = lit.util.norm_path(os.path.dirname(__file__))
7 config.test_exec_root = os.path.realpath(os.path.dirname(__file__))
88 config.test_source_root = os.path.join(config.test_exec_root, "tests")
3636 # CHECK-CONFIG-MAP-OUT: -- Test Suites --
3737 # CHECK-CONFIG-MAP-OUT: config-map - 2 tests
3838 # CHECK-CONFIG-MAP-OUT: Source Root: {{.*[/\\]config-map-discovery[/\\]tests}}
39 # CHECK-CONFIG-MAP-OUT: Exec Root : {{.*[/\\]tests[/\\]inputs[/\\]config-map-discovery}}
39 # CHECK-CONFIG-MAP-OUT: Exec Root : {{.*[/\\]tests[/\\]Inputs[/\\]config-map-discovery}}
4040 # CHECK-CONFIG-MAP-OUT: -- Available Tests --
4141 # CHECK-CONFIG-MAP-OUT-NOT: invalid-test.txt
4242 # CHECK-CONFIG-MAP-OUT: config-map :: test1.txt
77 def map_config(source_dir, site_config):
88 global config_map
99 source_dir = os.path.realpath(source_dir)
10 source_dir = os.path.normpath(source_dir)
11 source_dir = os.path.normcase(source_dir)
1210 site_config = os.path.normpath(site_config)
1311 config_map[source_dir] = site_config
1412