diff options
author | Zachary Turner <zturner@google.com> | 2017-09-18 23:36:35 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-09-18 23:36:35 +0000 |
commit | d1e5e35660003f7f1a8ae62e30011306b4e3fd8e (patch) | |
tree | 4263cb9d2856645a978a15b52a0afeffc6128ba8 | |
parent | 9ef85f06775dea8b5f11b118421e5ce997eb7c88 (diff) | |
download | llvm-d1e5e35660003f7f1a8ae62e30011306b4e3fd8e.zip llvm-d1e5e35660003f7f1a8ae62e30011306b4e3fd8e.tar.gz llvm-d1e5e35660003f7f1a8ae62e30011306b4e3fd8e.tar.bz2 |
[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
-rw-r--r-- | llvm/utils/lit/lit/discovery.py | 1 | ||||
-rwxr-xr-x | llvm/utils/llvm-lit/llvm-lit.in | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/llvm/utils/lit/lit/discovery.py b/llvm/utils/lit/lit/discovery.py index a5902d3..e276829 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 efad97a..a12056d 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) |