[all-commits] [llvm/llvm-project] 8e6279: [lit] Attempt for fix tests failing because of 'wa...

chbessonova via All-commits all-commits at lists.llvm.org
Sat Jun 12 03:51:33 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e62797963875e0cf93fcabda9e18bc0eff5da11
      https://github.com/llvm/llvm-project/commit/8e62797963875e0cf93fcabda9e18bc0eff5da11
  Author: Kristina Bessonova <kbessonova at accesssoftek.com>
  Date:   2021-06-12 (Sat, 12 Jun 2021)

  Changed paths:
    M llvm/cmake/modules/AddLLVM.cmake
    M llvm/utils/lit/lit/discovery.py

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

This is an attempt to fix clang test failures due to 'nonportable-include-path'
warnings on Windows when a path to llvm-project's base directory contains some
uppercase letters (excluding a drive letter).

The issue originates from 2 problems:
* discovery.py loads site config in lower case causing all the paths
based on __file__ and requested within the config file to be in lowercase as well,
* neither os.path.abspath() nor os.path.realpath() (both used to obtain paths of
config files, sources, object directories, etc) do not return paths in the correct
case for Windows (at least consistently for all python versions).

As os.path library doesn't seem to provide any relaible way to restore
the case for paths on Windows, this patch proposes to use pathlib.resolve().
pathlib is a part of Python 3.4 while llvm lit requires Python 3.6.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D103014




More information about the All-commits mailing list