-
Notifications
You must be signed in to change notification settings - Fork 239
Don't fetch block numbers nor check rpc version for ignored tests #3742
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
Abeeujah
wants to merge
12
commits into
foundry-rs:master
Choose a base branch
from
Abeeujah:ignore-flag
base: master
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.
+583
−66
Open
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
824de94
dev: Don't fetch block numbers nor check rpc version for ignored tests
Abeeujah 5fd44ff
Merge remote-tracking branch 'origin/master' into ignore-flag
Abeeujah bb4e267
dev: Revert to inexpensive safety check
Abeeujah 8546e3e
dev: check tests filter before resolving fork config
Abeeujah d09df8f
Merge branch 'master' into ignore-flag
Abeeujah dee6faf
dev: Fix Visibility and Ownership
Abeeujah c0eeffb
dev: Introduce TestCaseIsIgnored trait
Abeeujah 5b466f8
dev: Implement Default Trait for TestsFilter
Abeeujah a6cba94
dev: Test Fork Config Resolution
Abeeujah 11463a7
dev: Update branch
Abeeujah a6d2fdc
Merge branch 'master' into ignore-flag
Abeeujah 0da75a2
dev: Remove Default impl for TestsFilter
Abeeujah 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,7 +123,10 @@ impl TestCaseFilter for TestsFilter { | |
|
||
match self.ignored_filter { | ||
IgnoredFilter::All => true, | ||
IgnoredFilter::Ignored => ignored, | ||
IgnoredFilter::Ignored => { | ||
assert!(ignored); | ||
true | ||
} | ||
|
||
IgnoredFilter::NotIgnored => !ignored, | ||
} | ||
} | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't correct, in case forge is run with
--ignored
or--include-ignored
, they will not have their configs resolved.We should probably split separate the steps
test_target_with_config
andresolve_config
and call them as separate methods, not as a part oftest_package_with_config_resolved
.Then we can pass
TestsFilter
toresolve_config
and callresolve_fork_config
based on ifshould_be_run
is true for a test case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could probably make do without splitting from
test_package_with_config_resolved
and just passingTestFilter
to the method, but it seems a bit weird to me to use test filter without we even did any kind of filtering with it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing
tests_filter
totest_package_with_config_resolved
would require marking theignored_filter
fieldpub
, that looks like a change that would be needing approval?Filtering is being done there, tests which the fork config should be resolved or not is going to be dependent on the
tests_filter
argument being passed there, if it wasn't for that, then we'll be running into the issue described above, unless there's another way to resolve that.