@@ -118,6 +118,9 @@ enum Subcommand {
118118 /// `implementation-status`es that changes should be applied to.
119119 #[ clap( value_enum, long, default_value = "backlog" ) ]
120120 implementation_status : Vec < ImplementationStatus > ,
121+ /// What do when only `SKIP` outcomes are found for tests and subtests.
122+ #[ clap( value_enum, long, default_value_t = OnSkipOnly :: Reconcile ) ]
123+ on_skip_only : OnSkipOnly ,
121124 } ,
122125 /// Parse test metadata, apply automated fixups, and re-emit it in normalized form.
123126 #[ clap( name = "fixup" , alias = "fmt" ) ]
@@ -283,6 +286,24 @@ impl From<UpdateExpectedPreset> for process_reports::ReportProcessingPreset {
283286 }
284287}
285288
289+ /// See [`Subcommand::UpdateExpected::on_skip_only`].
290+ #[ derive( Clone , Copy , Debug , ValueEnum ) ]
291+ pub ( crate ) enum OnSkipOnly {
292+ /// Use reconcilation from the provided `--preset` with `SKIP` outcomes.
293+ Reconcile ,
294+ /// Do not change metadata.
295+ Ignore ,
296+ }
297+
298+ impl From < OnSkipOnly > for process_reports:: OnSkipOnly {
299+ fn from ( value : OnSkipOnly ) -> Self {
300+ match value {
301+ OnSkipOnly :: Ignore => Self :: Ignore ,
302+ OnSkipOnly :: Reconcile => Self :: Reconcile ,
303+ }
304+ }
305+ }
306+
286307#[ derive( Clone , Copy , Debug , Default , ValueEnum ) ]
287308enum OnZeroItem {
288309 Show ,
@@ -350,6 +371,7 @@ fn run(cli: Cli) -> ExitCode {
350371 exec_report_spec,
351372 process_reports:: ReportProcessingPreset :: MigrateTestStructure ,
352373 & mut should_update_expected:: NeverUpdateExpected ,
374+ OnSkipOnly :: Reconcile . into ( ) ,
353375 ) {
354376 Ok ( ( ) ) => ExitCode :: SUCCESS ,
355377 Err ( AlreadyReportedToCommandline ) => ExitCode :: FAILURE ,
@@ -358,6 +380,7 @@ fn run(cli: Cli) -> ExitCode {
358380 exec_report_spec,
359381 preset,
360382 implementation_status,
383+ on_skip_only,
361384 } => {
362385 assert ! (
363386 !implementation_status. is_empty( ) ,
@@ -375,6 +398,7 @@ fn run(cli: Cli) -> ExitCode {
375398 & mut should_update_expected:: ImplementationStatusFilter {
376399 allowed : allowed_implementation_statuses,
377400 } ,
401+ on_skip_only. into ( ) ,
378402 ) {
379403 Ok ( ( ) ) => ExitCode :: SUCCESS ,
380404 Err ( AlreadyReportedToCommandline ) => ExitCode :: FAILURE ,
@@ -1417,6 +1441,7 @@ fn process_reports(
14171441 exec_report_spec : ExecReportSpec ,
14181442 preset : process_reports:: ReportProcessingPreset ,
14191443 should_update_expected : & mut dyn ShouldUpdateExpected ,
1444+ on_skip_only : process_reports:: OnSkipOnly ,
14201445) -> Result < ( ) , AlreadyReportedToCommandline > {
14211446 let exec_report_paths = exec_report_spec. paths ( ) ?;
14221447
@@ -1430,6 +1455,7 @@ fn process_reports(
14301455 preset,
14311456 should_update_expected,
14321457 meta_files_by_path,
1458+ on_skip_only,
14331459 } ) ?;
14341460
14351461 log:: debug!( "processing complete, writing new metadata to file system…" ) ;
0 commit comments