diff options
| author | Henrik Tjäder <henrik@tjaders.com> | 2025-06-08 18:18:01 +0200 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2025-06-15 09:58:25 +0000 |
| commit | 90bb3249069cca053e7fd177f191b3d06fc06527 (patch) | |
| tree | c9251413b6474028d88474caf38167c8948448a4 /xtask/src/argument_parsing.rs | |
| parent | 6a68e8e54d2b006a888edab0f75e99a04675bb0a (diff) | |
xtask: Add --loom argument to test
For now filter to only rtic-sync in ci subcommand
Diffstat (limited to 'xtask/src/argument_parsing.rs')
| -rw-r--r-- | xtask/src/argument_parsing.rs | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index 07c6330..ae73782 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -93,7 +93,7 @@ impl Package { pub struct TestMetadata {} impl TestMetadata { - pub fn match_package(package: Package, backend: Backends) -> CargoCommand<'static> { + pub fn match_package(package: Package, backend: Backends, loom: bool) -> CargoCommand<'static> { match package { Package::Rtic => { let features = Some(backend.to_target().and_features(backend.to_rtic_feature())); @@ -102,6 +102,7 @@ impl TestMetadata { features, test: Some("ui".to_owned()), deny_warnings: true, + loom, } } Package::RticMacros => CargoCommand::Test { @@ -109,30 +110,35 @@ impl TestMetadata { features: Some(backend.to_rtic_macros_feature().to_owned()), test: None, deny_warnings: true, + loom, }, Package::RticSync => CargoCommand::Test { package: Some(package.name()), features: Some("testing".to_owned()), test: None, deny_warnings: true, + loom, }, Package::RticCommon => CargoCommand::Test { package: Some(package.name()), features: Some("testing".to_owned()), test: None, deny_warnings: true, + loom, }, Package::RticMonotonics => CargoCommand::Test { package: Some(package.name()), features: None, test: None, deny_warnings: true, + loom, }, Package::RticTime => CargoCommand::Test { package: Some(package.name()), features: Some("critical-section/std".into()), test: None, deny_warnings: true, + loom, }, } } @@ -489,7 +495,7 @@ pub enum Commands { Doc(Arg), /// Run tests - Test(PackageOpt), + Test(TestOpt), /// Build books with mdbook Book(Arg), @@ -511,12 +517,21 @@ pub struct FormatOpt { } #[derive(Args, Debug, Clone, Default)] +pub struct TestOpt { + #[clap(flatten)] + pub package: PackageOpt, + /// Should tests be loom tests + #[clap(short, long)] + pub loom: bool, +} + +#[derive(Args, Debug, Clone, Copy, Default)] /// Restrict to package, or run on whole workspace pub struct PackageOpt { /// For which package/workspace member to operate /// /// If omitted, work on all - package: Option<Package>, + pub package: Option<Package>, } impl PackageOpt { |
