[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.

llvm-svn: 313889
This commit is contained in:
Zachary Turner 2017-09-21 17:02:08 +00:00
parent 5a919cbea2
commit 43bcf226c1
5 changed files with 3 additions and 7 deletions

View File

@ -54,8 +54,6 @@ def getTestSuite(item, litConfig, cache):
config_map = litConfig.params.get('config_map')
if config_map:
cfgpath = os.path.realpath(cfgpath)
cfgpath = os.path.normpath(cfgpath)
cfgpath = os.path.normcase(cfgpath)
target = config_map.get(cfgpath)
if target:
cfgpath = target

View File

@ -4,7 +4,7 @@ import sys
main_config = sys.argv[1]
config_map = {lit.util.norm_path(main_config) : sys.argv[2]}
config_map = {os.path.realpath(main_config) : sys.argv[2]}
builtin_parameters = {'config_map' : config_map}
if __name__=='__main__':

View File

@ -5,5 +5,5 @@ config.suffixes = ['.txt']
config.test_format = lit.formats.ShTest()
import os
config.test_exec_root = lit.util.norm_path(os.path.dirname(__file__))
config.test_exec_root = os.path.realpath(os.path.dirname(__file__))
config.test_source_root = os.path.join(config.test_exec_root, "tests")

View File

@ -37,7 +37,7 @@
# CHECK-CONFIG-MAP-OUT: -- Test Suites --
# CHECK-CONFIG-MAP-OUT: config-map - 2 tests
# CHECK-CONFIG-MAP-OUT: Source Root: {{.*[/\\]config-map-discovery[/\\]tests}}
# CHECK-CONFIG-MAP-OUT: Exec Root : {{.*[/\\]tests[/\\]inputs[/\\]config-map-discovery}}
# CHECK-CONFIG-MAP-OUT: Exec Root : {{.*[/\\]tests[/\\]Inputs[/\\]config-map-discovery}}
# CHECK-CONFIG-MAP-OUT: -- Available Tests --
# CHECK-CONFIG-MAP-OUT-NOT: invalid-test.txt
# CHECK-CONFIG-MAP-OUT: config-map :: test1.txt

View File

@ -8,8 +8,6 @@ config_map = {}
def map_config(source_dir, site_config):
global config_map
source_dir = os.path.realpath(source_dir)
source_dir = os.path.normpath(source_dir)
source_dir = os.path.normcase(source_dir)
site_config = os.path.normpath(site_config)
config_map[source_dir] = site_config