[PATCH] D103014: [lit] Attempt for fix tests failing because of 'warning: non-portable path to file'

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 4 07:34:27 PDT 2021


thakis added a comment.

In D103014#2799049 <https://reviews.llvm.org/D103014#2799049>, @krisb wrote:

> In D103014#2792673 <https://reviews.llvm.org/D103014#2792673>, @Meinersbur wrote:
>
>> Besides the switch from os.path to pathlib, is the change to first build the path, then to resolve it (instead of first using abspath to resolve it, then concat the path) intentional?
>
> Oh, surely no. I'll add back resolving first. Thank you for pointing to this!
>
>> Could this also be fixed by making discovery.py consistently use the the map value instead its normcase-d key when building paths?
>
> We can do smth like
>
>   --- a/llvm/utils/lit/lit/discovery.py
>   +++ b/llvm/utils/lit/lit/discovery.py
>   @@ -53,8 +53,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)
>   +            target = config_map.get(os.path.normcase(cfgpath))
>                if target:
>                    cfgpath = target
>
> for discovery.py so that site config will be loaded in the 'original' case (and this seems to be right things to do), but it will not fully fix the problem.

I had tried that, but it didn't work: http://reviews.llvm.org/rGb9fd375d75d4bbf34453696127854d0192e3ccf6


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103014/new/

https://reviews.llvm.org/D103014



More information about the llvm-commits mailing list