[all-commits] [llvm/llvm-project] 849d67: [lit] Extend internal diff to support `-` argument

Joel E. Denny via All-commits all-commits at lists.llvm.org
Thu Oct 17 07:01:53 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 849d67a70080982cc1261759015a67b06b25eb16
      https://github.com/llvm/llvm-project/commit/849d67a70080982cc1261759015a67b06b25eb16
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M llvm/utils/lit/lit/builtin_commands/diff.py
    M llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt
    M llvm/utils/lit/tests/Inputs/shtest-shell/diff-pipes.txt
    A llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-7.txt
    A llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-8.txt
    M llvm/utils/lit/tests/max-failures.py
    M llvm/utils/lit/tests/shtest-shell.py

  Log Message:
  -----------
  [lit] Extend internal diff to support `-` argument

When using lit's internal shell, RUN lines like the following
accidentally execute an external `diff` instead of lit's internal
`diff`:

```
 # RUN: program | diff file -
```

Such cases exist now, in `clang/test/Analysis` for example.  We are
preparing patches to ensure lit's internal `diff` is called in such
cases, which will then fail because lit's internal `diff` doesn't
recognize `-` as a command-line option.  This patch adds support for
`-` to mean stdin.

Reviewed By: probinson, rnk

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

llvm-svn: 375116




More information about the All-commits mailing list