-
Notifications
You must be signed in to change notification settings - Fork 208
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
Feat add exclude pattern running tests #2361
base: master
Are you sure you want to change the base?
Feat add exclude pattern running tests #2361
Conversation
Please fill the checklist and add your changes to the changelog :) |
Also, always make sure to run |
Hi! This pull request hasn't had any activity for a while, so I am |
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.
Please run cargo lint
before committing changes and address CI run errors.
#[arg(long)] | ||
exclude_filter: Option<String>, |
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.
I would call it "exclude" in CLI
@@ -208,7 +212,7 @@ pub struct NewArgs { | |||
/// Do not initialize a new Git repository | |||
#[arg(long)] | |||
no_vcs: bool, | |||
/// Try to create the project even if the specified directory at <PATH> is not empty, which can result in overwriting existing files |
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.
What's the reason of this change?
@@ -85,6 +85,7 @@ impl RunForPackageArgs { | |||
args.include_ignored, | |||
args.rerun_failed, | |||
FailedTestsCache::new(cache_dir), | |||
args.exclude_filter.clone(), |
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.
Is clone necessary here?
if tests_filter.is_excluded(&case) { | ||
continue; | ||
} |
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.
TestCaseSummary
should be pushed to tasks as below
Closes #1512
Introduced changes
--exclude
flag that functions similarly to the existingFilterName
. This flag allows users to exclude tests based on their names.snforge test simple_test
launches all tests beginning with "simple_test", rather than requiringsnforge test --filter simple_test
). Given this, I believe the new--exclude
option might not be compatible with the existing filter option. What do you think?Checklist
CHANGELOG.md