1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[lit] Use realpath when adding to the config map.

Since the path a user specifies to the llvm-lit script might be
different than the source tree they built from (since they could
be behind different symlinks), we need to use realpath to make
sure that path comparisons work as expected.

Even better would be to use a custom dictionary comparison with
actual file equivalence comparison semantics, but this is the
least friction to unbreak things for now.

llvm-svn: 313594
This commit is contained in:
Zachary Turner 2017-09-18 23:36:35 +00:00
parent 837145b1d0
commit 8a95021a63
2 changed files with 2 additions and 0 deletions

View File

@ -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)

View File

@ -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)