mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
643090aa23
Lit as it exists today has three hacks that allow users to run tests earlier: 1) An entire test suite can set the `is_early` boolean. 2) A very recently introduced "early_tests" feature. 3) The `--incremental` flag forces failing tests to run first. All of these approaches have problems. 1) The `is_early` feature was until very recently undocumented. Nevertheless it still lacks testing and is a imprecise way of optimizing test starting times. 2) The `early_tests` feature requires manual updates and doesn't scale. 3) `--incremental` is undocumented, untested, and it requires modifying the *source* file system by "touching" the file. This "touch" based approach is arguably a hack because it confuses editors (because it looks like the test was modified behind the back of the editor) and "touching" the test source file doesn't work if the test suite is read only from the perspective of `lit` (via advanced filesystem/build tricks). This patch attempts to simplify and address all of the above problems. This patch formalizes, documents, tests, and defaults lit to recording the execution time of tests and then reordering all tests during the next execution. By reordering the tests, high core count machines run faster, sometimes significantly so. This patch also always runs failing tests first, which is a positive user experience win for those that didn't know about the hidden `--incremental` flag. Finally, if users want, they can _optionally_ commit the test timing data (or a subset thereof) back to the repository to accelerate bots and first-time runs of the test suite. Reviewed By: jhenderson, yln Differential Revision: https://reviews.llvm.org/D98179
20 lines
650 B
Python
20 lines
650 B
Python
# Check that --ignore-fail produces exit status 0 despite various kinds of
|
|
# test failures but doesn't otherwise suppress those failures.
|
|
|
|
# RUN: not %{lit} -j 1 %{inputs}/ignore-fail | FileCheck %s
|
|
# RUN: %{lit} -j 1 --ignore-fail %{inputs}/ignore-fail | FileCheck %s
|
|
|
|
# END.
|
|
|
|
# CHECK-DAG: FAIL: ignore-fail :: fail.txt
|
|
# CHECK-DAG: UNRESOLVED: ignore-fail :: unresolved.txt
|
|
# CHECK-DAG: XFAIL: ignore-fail :: xfail.txt
|
|
# CHECK-DAG: XPASS: ignore-fail :: xpass.txt
|
|
|
|
# CHECK: Testing Time:
|
|
# CHECK-NEXT: Expectedly Failed : 1
|
|
# CHECK-NEXT: Unresolved : 1
|
|
# CHECK-NEXT: Failed : 1
|
|
# CHECK-NEXT: Unexpectedly Passed: 1
|
|
# CHECK-NOT: {{.}}
|