diff options
| author | datdenkikniet <jcdra1@gmail.com> | 2023-04-16 12:51:11 +0200 |
|---|---|---|
| committer | datdenkikniet <jcdra1@gmail.com> | 2023-04-16 13:08:46 +0200 |
| commit | 2db26c1015f0a32fe43e71d60f5fd75dbb25f40c (patch) | |
| tree | f4154034e53a2a396a487f1859d5d84c7c9b92f1 /xtask/src/argument_parsing.rs | |
| parent | 4d3361658b2487154d8140b06b140e72c0227441 (diff) | |
Deny on warnings in xtasks
Diffstat (limited to 'xtask/src/argument_parsing.rs')
| -rw-r--r-- | xtask/src/argument_parsing.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index 8c8f7d2..d7c0262 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -94,7 +94,11 @@ impl Package { pub struct TestMetadata {} impl TestMetadata { - pub fn match_package(package: Package, backend: Backends) -> CargoCommand<'static> { + pub fn match_package( + deny_warnings: bool, + package: Package, + backend: Backends, + ) -> CargoCommand<'static> { match package { Package::Rtic => { let features = format!( @@ -107,32 +111,38 @@ impl TestMetadata { package: Some(package.name()), features, test: Some("ui".to_owned()), + deny_warnings, } } Package::RticMacros => CargoCommand::Test { package: Some(package.name()), features: Some(backend.to_rtic_macros_feature().to_owned()), test: None, + deny_warnings, }, Package::RticSync => CargoCommand::Test { package: Some(package.name()), features: Some("testing".to_owned()), test: None, + deny_warnings, }, Package::RticCommon => CargoCommand::Test { package: Some(package.name()), features: Some("testing".to_owned()), test: None, + deny_warnings, }, Package::RticMonotonics => CargoCommand::Test { package: Some(package.name()), features: None, test: None, + deny_warnings, }, Package::RticTime => CargoCommand::Test { package: Some(package.name()), features: Some("critical-section/std".into()), test: None, + deny_warnings, }, } } @@ -192,6 +202,10 @@ pub enum BuildOrCheck { #[derive(Parser, Clone)] pub struct Globals { + /// Error out on warnings + #[arg(short = 'D', long)] + pub deny_warnings: bool, + /// For which backend to build. #[arg(value_enum, short, default_value = "thumbv7", long, global = true)] pub backend: Option<Backends>, |
