@@ -115,7 +115,8 @@ enum Subcommand {
115115 /// status.
116116 UpdateBacklog {
117117 /// The mode to use for updating tests.
118- preset : UpdateBacklogPreset ,
118+ #[ clap( subcommand) ]
119+ preset : UpdateBacklogSubcommand ,
119120 } ,
120121 /// Dump all metadata as JSON. Do so at your own risk; no guarantees are made about the
121122 /// schema of this JSON, for now.
@@ -142,10 +143,13 @@ enum OnZeroItem {
142143 Hide ,
143144}
144145
145- #[ derive( Clone , Copy , Debug , ValueEnum ) ]
146- enum UpdateBacklogPreset {
146+ #[ derive( Clone , Copy , Debug , Parser ) ]
147+ enum UpdateBacklogSubcommand {
147148 /// Remove tests that expect only `PASS` outcomes on all platforms from `backlog`.
148- PromotePermaPassing ,
149+ PromotePermaPassing {
150+ #[ clap( long, default_value_t = true ) ]
151+ only_across_all_platforms : bool ,
152+ } ,
149153}
150154
151155fn main ( ) -> ExitCode {
@@ -1509,9 +1513,17 @@ fn run(cli: Cli) -> ExitCode {
15091513 let value_across_all_platforms =
15101514 || cases. into_iter ( ) . map ( |( _, case) | case) . all_equal_value ( ) ;
15111515 match preset {
1512- UpdateBacklogPreset :: PromotePermaPassing => {
1516+ UpdateBacklogSubcommand :: PromotePermaPassing {
1517+ only_across_all_platforms,
1518+ } => {
15131519 if matches ! ( value_across_all_platforms( ) , Ok ( Case :: PermaPass ) ) {
15141520 properties. implementation_status = None ;
1521+ } else if !only_across_all_platforms {
1522+ properties. implementation_status =
1523+ Some ( cases. map ( |case| match case {
1524+ Case :: PermaPass => ImplementationStatus :: Implementing ,
1525+ Case :: Other => ImplementationStatus :: Backlog ,
1526+ } ) ) ;
15151527 }
15161528 }
15171529 }
0 commit comments