diff --git a/utils/lit/lit/discovery.py b/utils/lit/lit/discovery.py index aba7453e9d4..398b6cecd5a 100644 --- a/utils/lit/lit/discovery.py +++ b/utils/lit/lit/discovery.py @@ -54,6 +54,7 @@ def getTestSuite(item, litConfig, cache): config_map = litConfig.params.get('config_map') if config_map: cfgpath = os.path.realpath(cfgpath) + cfgpath = os.path.normcase(cfgpath) target = config_map.get(cfgpath) if target: cfgpath = target diff --git a/utils/lit/tests/Inputs/config-map-discovery/driver.py b/utils/lit/tests/Inputs/config-map-discovery/driver.py index b5344e8fb83..db9141b9b1b 100644 --- a/utils/lit/tests/Inputs/config-map-discovery/driver.py +++ b/utils/lit/tests/Inputs/config-map-discovery/driver.py @@ -3,8 +3,10 @@ import os import sys main_config = sys.argv[1] +main_config = os.path.realpath(main_config) +main_config = os.path.normcase(main_config) -config_map = {os.path.realpath(main_config) : sys.argv[2]} +config_map = {main_config : sys.argv[2]} builtin_parameters = {'config_map' : config_map} if __name__=='__main__': diff --git a/utils/lit/tests/discovery.py b/utils/lit/tests/discovery.py index c6b705c6293..dbabeb39f19 100644 --- a/utils/lit/tests/discovery.py +++ b/utils/lit/tests/discovery.py @@ -45,7 +45,7 @@ # CHECK-CONFIG-MAP-ERR: loading suite config '{{.*}}lit.alt.cfg' # CHECK-CONFIG-MAP-ERR: loaded config '{{.*}}lit.alt.cfg' -# CHECK-CONFIG-MAP-ERR: resolved input '{{.*config-map-discovery[/\\]main-config}}' to 'config-map'::() +# CHECK-CONFIG-MAP-ERR: resolved input '{{.*(/|\\\\)config-map-discovery(/|\\\\)main-config}}' to 'config-map'::() # Check discovery when exact test names are given. diff --git a/utils/llvm-lit/llvm-lit.in b/utils/llvm-lit/llvm-lit.in index fd306cced36..de67b18e52c 100755 --- a/utils/llvm-lit/llvm-lit.in +++ b/utils/llvm-lit/llvm-lit.in @@ -8,6 +8,7 @@ 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