From e4b673646a9e846fabf24d6776e2a915a5c7366d Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Sun, 16 Apr 2023 13:30:23 +0200 Subject: [PATCH] Tests should always deny warnings --- xtask/src/argument_parsing.rs | 18 +++++++----------- xtask/src/run.rs | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index d7c0262fb7..05d0ae45ca 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -94,11 +94,7 @@ impl Package { pub struct TestMetadata {} impl TestMetadata { - pub fn match_package( - deny_warnings: bool, - package: Package, - backend: Backends, - ) -> CargoCommand<'static> { + pub fn match_package(package: Package, backend: Backends) -> CargoCommand<'static> { match package { Package::Rtic => { let features = format!( @@ -111,38 +107,38 @@ impl TestMetadata { package: Some(package.name()), features, test: Some("ui".to_owned()), - deny_warnings, + deny_warnings: true, } } Package::RticMacros => CargoCommand::Test { package: Some(package.name()), features: Some(backend.to_rtic_macros_feature().to_owned()), test: None, - deny_warnings, + deny_warnings: true, }, Package::RticSync => CargoCommand::Test { package: Some(package.name()), features: Some("testing".to_owned()), test: None, - deny_warnings, + deny_warnings: true, }, Package::RticCommon => CargoCommand::Test { package: Some(package.name()), features: Some("testing".to_owned()), test: None, - deny_warnings, + deny_warnings: true, }, Package::RticMonotonics => CargoCommand::Test { package: Some(package.name()), features: None, test: None, - deny_warnings, + deny_warnings: true, }, Package::RticTime => CargoCommand::Test { package: Some(package.name()), features: Some("critical-section/std".into()), test: None, - deny_warnings, + deny_warnings: true, }, } } diff --git a/xtask/src/run.rs b/xtask/src/run.rs index 13d2e22ee5..bf8d3b7b6e 100644 --- a/xtask/src/run.rs +++ b/xtask/src/run.rs @@ -345,7 +345,7 @@ pub fn cargo_test<'c>( package .packages() .map(|p| { - let meta = TestMetadata::match_package(globals.deny_warnings, p, backend); + let meta = TestMetadata::match_package(p, backend); (globals, meta, false) }) .run_and_coalesce()