diff --git a/llvm/utils/lit/lit/discovery.py b/llvm/utils/lit/lit/discovery.py index a5902d365df3..e276829db39d 100644 --- a/llvm/utils/lit/lit/discovery.py +++ b/llvm/utils/lit/lit/discovery.py @@ -48,6 +48,7 @@ def getTestSuite(item, litConfig, cache): # configuration to load instead. 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) diff --git a/llvm/utils/llvm-lit/llvm-lit.in b/llvm/utils/llvm-lit/llvm-lit.in index efad97ade7e2..a12056dcc559 100755 --- a/llvm/utils/llvm-lit/llvm-lit.in +++ b/llvm/utils/llvm-lit/llvm-lit.in @@ -7,6 +7,7 @@ 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)