Skip to content

Commit 01d0082

Browse files
committed
Add support for --no-default-features flag in test command
1 parent 6d95175 commit 01d0082

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

crates/tracel-xtask-macros/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,12 @@ fn get_additional_cmd_args_map() -> HashMap<&'static str, proc_macro2::TokenStre
267267
required = false
268268
)]
269269
pub features: Option<Vec<String>>,
270+
#[doc = r"If set, ignore default features."]
271+
#[arg(
272+
long = "no-default-features",
273+
required = false
274+
)]
275+
pub no_default_features: bool,
270276
},
271277
),
272278
(
@@ -487,6 +493,7 @@ fn generate_command_args_tryinto(args: TokenStream, input: TokenStream) -> Token
487493
if ident_str != "target"
488494
&& (ident_str == "exclude"
489495
|| ident_str == "features"
496+
|| ident_str == "no_default_features"
490497
|| ident_str == "only"
491498
|| ident_str == "ignore_audit"
492499
|| ident_str == "jobs"

crates/tracel-xtask/src/commands/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub fn handle_command(args: TestCmdArgs) -> anyhow::Result<()> {
3333
threads: args.threads,
3434
jobs: args.jobs,
3535
features: args.features.clone(),
36+
no_default_features: args.no_default_features,
3637
})
3738
}),
3839
}

crates/tracel-xtask/src/commands/validate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pub fn handle_command(args: ValidateCmdArgs) -> anyhow::Result<()> {
3939
jobs: None,
4040
command: Some(TestSubCommand::All),
4141
features: None,
42+
no_default_features: false,
4243
})?;
4344

4445
Ok(())

0 commit comments

Comments
 (0)