[all-commits] [llvm/llvm-project] 6541d3: [test] Add lit helper for windows paths

Keith Smiley via All-commits all-commits at lists.llvm.org
Mon Mar 14 20:06:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6541d3e979c1c53adca758d35dfe4e6f4d4e597c
      https://github.com/llvm/llvm-project/commit/6541d3e979c1c53adca758d35dfe4e6f4d4e597c
  Author: Keith Smiley <keithbsmiley at gmail.com>
  Date:   2022-03-14 (Mon, 14 Mar 2022)

  Changed paths:
    M llvm/docs/CommandGuide/lit.rst
    M llvm/docs/TestingGuide.rst
    M llvm/utils/lit/lit/TestRunner.py

  Log Message:
  -----------
  [test] Add lit helper for windows paths

This adds 2 new lit helpers `%{fs-src-root}` and `%{fs-sep}`, these
allow writing tests that correctly handle slashes on Windows. In the
case of tests like clang/test/CodeGen/debug-prefix-map.c, these are
unable to correctly test behavior on both platforms, unless they fork
and add OS requirements, because the relevant logic hits host specific
codepaths like checking if paths are absolute.

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




More information about the All-commits mailing list