-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[llvm][lit] Add option to run only the failed tests #158043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Michael137
wants to merge
17
commits into
llvm:main
Choose a base branch
from
Michael137:llvm/lit-filter-failed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+84
−0
Open
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
fe20c20
[llvm][lit] Add option to run only the failed tests
Michael137 c4ceeac
fixup! docs
Michael137 9e36ec2
fixup! omit terminating '.' in help text
Michael137 5eabe3b
fixup! expand docs
Michael137 07e2f75
fixup! fix spacing in test
Michael137 652a733
fixup! add 'newly added tests' test case
Michael137 93ef008
fixup! revert changes to ignore-fail
Michael137 fc70e28
fixup! add more tests
Michael137 c3d1e18
fixup! use --input-file
Michael137 4aa6397
fixup! use temporary directory for input manipulation
Michael137 436f0b0
fixup! typo; check that test-suite ran in test
Michael137 bcb3f32
fixup! rename CHECK-RERUN directives
Michael137 d17641e
fixup! use %{fs-sep}
Michael137 24364e2
fixup! more path separator fixes
Michael137 f363066
fixup! try modified unresolved.txt
Michael137 138cdbc
fixup! try modified unresolved.txt
Michael137 39e562d
fixup! try modified unresolved.txt
Michael137 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
RUN: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import lit.formats | ||
|
||
config.name = "filter-failed" | ||
config.suffixes = [".txt"] | ||
config.test_format = lit.formats.ShTest() | ||
config.test_source_root = None | ||
config.test_exec_root = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
RUN: true |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
RUN: false | ||
XFAIL: * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
RUN: true | ||
XFAIL: * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Shows behaviour when a previously failed test was deleted | ||
# before running with --filter-failed. | ||
|
||
# RUN: rm -rf %t | ||
# RUN: cp -r %{inputs}/filter-failed %t | ||
# | ||
# RUN: not %{lit} %t | FileCheck %s --check-prefix=CHECK-FIRST | ||
# | ||
# RUN: rm %t/fail.txt | ||
# RUN: not %{lit} --filter-failed %t | FileCheck %s --check-prefix=CHECK-RERUN | ||
|
||
# CHECK-FIRST: FAIL: filter-failed :: fail.txt | ||
|
||
# CHECK-RERUN-NOT: filter-failed :: fail.txt | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Checks that --filter-failed won't re-run tests that have passed | ||
# since the last time --filter-failed has run. | ||
jh7370 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
# RUN: rm -rf %t | ||
# RUN: cp -r %{inputs}/filter-failed %t | ||
# | ||
# RUN: not %{lit} %t | FileCheck %s --check-prefix=CHECK-FIRST | ||
# | ||
# RUN: cp %t/pass.txt %t/fail.txt | ||
# RUN: not %{lit} %t | FileCheck %s --check-prefix=CHECK-RERUN1 | ||
# RUN: not %{lit} --filter-failed %t | FileCheck %s --check-prefix=CHECK-RERUN2 | ||
|
||
# CHECK-FIRST: FAIL: filter-failed :: fail.txt | ||
|
||
# CHECK-RERUN1: PASS: filter-failed :: fail.txt | ||
|
||
# CHECK-RERUN2: Testing: 2 of 5 tests | ||
# CHECK-RERUN2-NOT: filter-failed :: fail.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Checks that --filter-failed only runs tests that previously failed. | ||
|
||
# RUN: rm -rf %t | ||
# RUN: cp -r %{inputs}/filter-failed %t | ||
# | ||
# RUN: not %{lit} %t | ||
# | ||
# RUN: echo "RUN: false" > %t/new-fail.txt | ||
# RUN: echo "RUN: true" > %t/new-pass.txt | ||
# | ||
# RUN: not %{lit} --filter-failed %t | FileCheck %s | ||
|
||
# CHECK: Testing: 3 of 7 tests | ||
# CHECK-DAG: FAIL: filter-failed :: fail.txt | ||
# CHECK-DAG: UNRESOLVED: filter-failed :: unresolved.txt | ||
# CHECK-DAG: XPASS: filter-failed :: xpass.txt | ||
|
||
# CHECK: Testing Time: | ||
# CHECK: Total Discovered Tests: | ||
# CHECK-NEXT: Excluded : 4 {{\([0-9]*\.[0-9]*%\)}} | ||
# CHECK-NEXT: Unresolved : 1 {{\([0-9]*\.[0-9]*%\)}} | ||
# CHECK-NEXT: Failed : 1 {{\([0-9]*\.[0-9]*%\)}} | ||
# CHECK-NEXT: Unexpectedly Passed: 1 {{\([0-9]*\.[0-9]*%\)}} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.