-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 global -j, --threads #9367
Conversation
@@ -898,10 +882,6 @@ impl Provider for TestArgs { | |||
dict.insert("show_progress".to_string(), true.into()); | |||
} | |||
|
|||
if let Some(threads) = self.threads { | |||
dict.insert("threads".to_string(), threads.into()); |
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 have threads
in config but I don't really know where it should spawn the thread pool, and also it would conflict with the CLI arg if both are present
jobs: Option<NonZeroUsize>, | ||
/// Number of threads to use. Zero specifies the number of logical cores. | ||
#[arg(global = true, long, short = 'j', visible_alias = "jobs")] | ||
threads: Option<usize>, |
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.
Has the same value as the global one
crates/forge/bin/cmd/test/mod.rs
Outdated
/// Include the global options. | ||
#[command(flatten)] | ||
pub global: GlobalOpts, |
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 is required for the CLI tests that use TestArgs directly, same for ScriptArgs
c63c13a
to
bca4ec3
Compare
bca4ec3
to
9eb3651
Compare
Closes #8408