[all-commits] [llvm/llvm-project] 2a5aa8: [lit] Add --ignore-fail

Joel E. Denny via All-commits all-commits at lists.llvm.org
Wed Feb 24 10:13:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a5aa81739d31959600978c0f11332823010a754
      https://github.com/llvm/llvm-project/commit/2a5aa81739d31959600978c0f11332823010a754
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2021-02-24 (Wed, 24 Feb 2021)

  Changed paths:
    M llvm/docs/CommandGuide/lit.rst
    M llvm/utils/lit/lit/cl_arguments.py
    M llvm/utils/lit/lit/main.py
    A llvm/utils/lit/tests/Inputs/ignore-fail/fail.txt
    A llvm/utils/lit/tests/Inputs/ignore-fail/lit.cfg
    A llvm/utils/lit/tests/Inputs/ignore-fail/unresolved.txt
    A llvm/utils/lit/tests/Inputs/ignore-fail/xfail.txt
    A llvm/utils/lit/tests/Inputs/ignore-fail/xpass.txt
    A llvm/utils/lit/tests/ignore-fail.py

  Log Message:
  -----------
  [lit] Add --ignore-fail

For some build configurations, `check-all` calls lit multiple times to
run multiple lit test suites.  Most recently, I've found this to be
true when configuring openmp as part of `LLVM_ENABLE_RUNTIMES`, but
this is not the first time.

If one test suite fails, none of the remaining test suites run, so you
cannot determine if your patch has broken them.  It can then be
frustrating to try to determine which `check-` targets will run the
remaining tests without getting stuck on the failing tests.

When such cases arise, it is probably best to adjust the cmake
configuration for `check-all` to run all test suites as part of one
lit invocation.  Because that fix will likely not be implemented and
land immediately, this patch introduces `--ignore-fail` to serve as a
workaround for developers trying to see test results until it does
land:

```
$ LIT_OPTS=--ignore-fail ninja check-all
```

One problem with `--ignore-fail` is that it makes it challenging to
detect test failures in a script, perhaps in CI.  This problem should
serve as motivation to actually fix the cmake configuration instead of
continuing to use `--ignore-fail` indefinitely.

Reviewed By: jhenderson, thopre

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




More information about the All-commits mailing list