From 39a06368c8f1e6e77c1e838b0a8a39e548c344f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 2 Mar 2023 19:40:50 +0100 Subject: [PATCH] xtask: rtic-sync --- xtask/src/argument_parsing.rs | 13 +++---------- xtask/src/cargo_commands.rs | 13 ++----------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index bd28492dcc..aff464c941 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -5,11 +5,10 @@ use core::fmt; #[derive(clap::ValueEnum, Copy, Clone, Debug)] pub enum Package { Rtic, - RticArbiter, - RticChannel, RticCommon, RticMacros, RticMonotonics, + RticSync, RticTime, } @@ -23,11 +22,10 @@ impl Package { pub fn name(&self) -> &str { match self { Package::Rtic => "rtic", - Package::RticArbiter => "rtic-arbiter", - Package::RticChannel => "rtic-channel", Package::RticCommon => "rtic-common", Package::RticMacros => "rtic-macros", Package::RticMonotonics => "rtic-monotonics", + Package::RticSync => "rtic-sync", Package::RticTime => "rtic-time", } } @@ -55,12 +53,7 @@ impl TestMetadata { features: Some(backend.to_rtic_macros_feature().to_owned()), test: None, }, - Package::RticArbiter => CargoCommand::Test { - package: Some(package), - features: Some("testing".to_owned()), - test: None, - }, - Package::RticChannel => CargoCommand::Test { + Package::RticSync => CargoCommand::Test { package: Some(package), features: Some("testing".to_owned()), test: None, diff --git a/xtask/src/cargo_commands.rs b/xtask/src/cargo_commands.rs index 996fa9c918..31250d458c 100644 --- a/xtask/src/cargo_commands.rs +++ b/xtask/src/cargo_commands.rs @@ -129,25 +129,16 @@ pub fn cargo_doc(cargoarg: &Option<&str>, backend: Backends) -> anyhow::Result<( /// If no package is specified, loop through all packages pub fn cargo_test(package: &PackageOpt, backend: Backends) -> anyhow::Result<()> { if let Some(package) = package.package { - let cmd = match package { - Package::Rtic => TestMetadata::match_package(package, backend), - Package::RticArbiter => TestMetadata::match_package(package, backend), - Package::RticChannel => TestMetadata::match_package(package, backend), - Package::RticCommon => TestMetadata::match_package(package, backend), - Package::RticMacros => TestMetadata::match_package(package, backend), - Package::RticMonotonics => TestMetadata::match_package(package, backend), - Package::RticTime => TestMetadata::match_package(package, backend), - }; + let cmd = TestMetadata::match_package(package, backend); command_parser(&cmd, false)?; } else { // Iterate over all workspace packages for package in [ Package::Rtic, - Package::RticArbiter, - Package::RticChannel, Package::RticCommon, Package::RticMacros, Package::RticMonotonics, + Package::RticSync, Package::RticTime, ] { let mut error_messages = vec![];