mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-25 03:19:34 +01:00
xtask: rtic-sync
This commit is contained in:
parent
32b537aef6
commit
39a06368c8
2 changed files with 5 additions and 21 deletions
|
@ -5,11 +5,10 @@ use core::fmt;
|
||||||
#[derive(clap::ValueEnum, Copy, Clone, Debug)]
|
#[derive(clap::ValueEnum, Copy, Clone, Debug)]
|
||||||
pub enum Package {
|
pub enum Package {
|
||||||
Rtic,
|
Rtic,
|
||||||
RticArbiter,
|
|
||||||
RticChannel,
|
|
||||||
RticCommon,
|
RticCommon,
|
||||||
RticMacros,
|
RticMacros,
|
||||||
RticMonotonics,
|
RticMonotonics,
|
||||||
|
RticSync,
|
||||||
RticTime,
|
RticTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,11 +22,10 @@ impl Package {
|
||||||
pub fn name(&self) -> &str {
|
pub fn name(&self) -> &str {
|
||||||
match self {
|
match self {
|
||||||
Package::Rtic => "rtic",
|
Package::Rtic => "rtic",
|
||||||
Package::RticArbiter => "rtic-arbiter",
|
|
||||||
Package::RticChannel => "rtic-channel",
|
|
||||||
Package::RticCommon => "rtic-common",
|
Package::RticCommon => "rtic-common",
|
||||||
Package::RticMacros => "rtic-macros",
|
Package::RticMacros => "rtic-macros",
|
||||||
Package::RticMonotonics => "rtic-monotonics",
|
Package::RticMonotonics => "rtic-monotonics",
|
||||||
|
Package::RticSync => "rtic-sync",
|
||||||
Package::RticTime => "rtic-time",
|
Package::RticTime => "rtic-time",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,12 +53,7 @@ impl TestMetadata {
|
||||||
features: Some(backend.to_rtic_macros_feature().to_owned()),
|
features: Some(backend.to_rtic_macros_feature().to_owned()),
|
||||||
test: None,
|
test: None,
|
||||||
},
|
},
|
||||||
Package::RticArbiter => CargoCommand::Test {
|
Package::RticSync => CargoCommand::Test {
|
||||||
package: Some(package),
|
|
||||||
features: Some("testing".to_owned()),
|
|
||||||
test: None,
|
|
||||||
},
|
|
||||||
Package::RticChannel => CargoCommand::Test {
|
|
||||||
package: Some(package),
|
package: Some(package),
|
||||||
features: Some("testing".to_owned()),
|
features: Some("testing".to_owned()),
|
||||||
test: None,
|
test: None,
|
||||||
|
|
|
@ -129,25 +129,16 @@ pub fn cargo_doc(cargoarg: &Option<&str>, backend: Backends) -> anyhow::Result<(
|
||||||
/// If no package is specified, loop through all packages
|
/// If no package is specified, loop through all packages
|
||||||
pub fn cargo_test(package: &PackageOpt, backend: Backends) -> anyhow::Result<()> {
|
pub fn cargo_test(package: &PackageOpt, backend: Backends) -> anyhow::Result<()> {
|
||||||
if let Some(package) = package.package {
|
if let Some(package) = package.package {
|
||||||
let cmd = match package {
|
let cmd = TestMetadata::match_package(package, backend);
|
||||||
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),
|
|
||||||
};
|
|
||||||
command_parser(&cmd, false)?;
|
command_parser(&cmd, false)?;
|
||||||
} else {
|
} else {
|
||||||
// Iterate over all workspace packages
|
// Iterate over all workspace packages
|
||||||
for package in [
|
for package in [
|
||||||
Package::Rtic,
|
Package::Rtic,
|
||||||
Package::RticArbiter,
|
|
||||||
Package::RticChannel,
|
|
||||||
Package::RticCommon,
|
Package::RticCommon,
|
||||||
Package::RticMacros,
|
Package::RticMacros,
|
||||||
Package::RticMonotonics,
|
Package::RticMonotonics,
|
||||||
|
Package::RticSync,
|
||||||
Package::RticTime,
|
Package::RticTime,
|
||||||
] {
|
] {
|
||||||
let mut error_messages = vec![];
|
let mut error_messages = vec![];
|
||||||
|
|
Loading…
Reference in a new issue