Skip to content

Commit 3847648

Browse files
authored
Revert "[llvm][lit] Add option to run only the failed tests" (#171582)
Reverts #158043 This was approved for earlier revisions but the tests were failing on Windows. I pushed a speculative fix and that fixed the CI, which caused auto-merge to merge the PR. But I'd like to have approval for the latest revision. So reverting for now and resubmitting a new PR
1 parent 8684962 commit 3847648

File tree

13 files changed

+1
-85
lines changed

13 files changed

+1
-85
lines changed

llvm/docs/CommandGuide/lit.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,6 @@ The timing data is stored in the `test_exec_root` in a file named
314314
place of this option, which is especially useful in environments where the
315315
call to ``lit`` is issued indirectly.
316316

317-
.. option:: --filter-failed
318-
319-
Run only those tests that previously failed. Tests that have been newly added
320-
but not yet run are not included.
321-
322317
.. option:: --xfail LIST
323318

324319
Treat those tests whose name is in the semicolon separated list ``LIST`` as

llvm/utils/lit/lit/TestTimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def record_test_times(tests, lit_config):
2222
continue
2323
if not t.suite.exec_root in times_by_suite:
2424
times_by_suite[t.suite.exec_root] = read_test_times(t.suite)
25-
time = min(-t.result.elapsed, -1.0e-6) if t.isFailure() else t.result.elapsed
25+
time = -t.result.elapsed if t.isFailure() else t.result.elapsed
2626
# The "path" here is only used as a key into a dictionary. It is never
2727
# used as an actual path to a filesystem API, therefore we use '/' as
2828
# the canonical separator so that Unix and Windows machines can share

llvm/utils/lit/lit/cl_arguments.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,12 +423,6 @@ def parse_args():
423423
help="Filter out tests with paths matching the given regular expression",
424424
default=os.environ.get("LIT_FILTER_OUT", "^$"),
425425
)
426-
selection_group.add_argument(
427-
"--filter-failed",
428-
dest="filterFailed",
429-
help="Only run tests which failed in the previous run",
430-
action="store_true",
431-
)
432426
selection_group.add_argument(
433427
"--xfail",
434428
metavar="LIST",

llvm/utils/lit/lit/main.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ def main(builtin_params={}):
9090
and not opts.filter_out.search(t.getFullName())
9191
]
9292

93-
if opts.filterFailed:
94-
selected_tests = [t for t in selected_tests if t.previous_failure]
95-
9693
if not selected_tests:
9794
sys.stderr.write(
9895
"error: filter did not match any tests "

llvm/utils/lit/tests/Inputs/filter-failed/fail.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

llvm/utils/lit/tests/Inputs/filter-failed/lit.cfg

Lines changed: 0 additions & 7 deletions
This file was deleted.

llvm/utils/lit/tests/Inputs/filter-failed/pass.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

llvm/utils/lit/tests/Inputs/filter-failed/unresolved.txt

Whitespace-only changes.

llvm/utils/lit/tests/Inputs/filter-failed/xfail.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

llvm/utils/lit/tests/Inputs/filter-failed/xpass.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)