@@ -118,6 +118,10 @@ 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+ /// Assumptions about report coverage that affect cases where tests are present in
122+ /// metadata, but not in reports.
123+ #[ clap( value_enum, long, default_value_t = OnSkipOnly :: Reconcile ) ]
124+ on_skip_only : OnSkipOnly ,
121125 } ,
122126 /// Parse test metadata, apply automated fixups, and re-emit it in normalized form.
123127 #[ clap( name = "fixup" , alias = "fmt" ) ]
@@ -283,6 +287,24 @@ impl From<UpdateExpectedPreset> for process_reports::ReportProcessingPreset {
283287 }
284288}
285289
290+ /// See [`Subcommand::UpdateExpected::on_skip_only`].
291+ #[ derive( Clone , Copy , Debug , ValueEnum ) ]
292+ pub ( crate ) enum OnSkipOnly {
293+ /// Use reconcilation from the provided `--preset` with `SKIP` outcomes.
294+ Reconcile ,
295+ /// Do not change metadata.
296+ Ignore ,
297+ }
298+
299+ impl From < OnSkipOnly > for process_reports:: OnSkipOnly {
300+ fn from ( value : OnSkipOnly ) -> Self {
301+ match value {
302+ OnSkipOnly :: Ignore => Self :: Ignore ,
303+ OnSkipOnly :: Reconcile => Self :: Reconcile ,
304+ }
305+ }
306+ }
307+
286308#[ derive( Clone , Copy , Debug , Default , ValueEnum ) ]
287309enum OnZeroItem {
288310 Show ,
@@ -350,6 +372,7 @@ fn run(cli: Cli) -> ExitCode {
350372 exec_report_spec,
351373 process_reports:: ReportProcessingPreset :: MigrateTestStructure ,
352374 & mut should_update_expected:: NeverUpdateExpected ,
375+ OnSkipOnly :: Reconcile . into ( ) ,
353376 ) {
354377 Ok ( ( ) ) => ExitCode :: SUCCESS ,
355378 Err ( AlreadyReportedToCommandline ) => ExitCode :: FAILURE ,
@@ -358,6 +381,7 @@ fn run(cli: Cli) -> ExitCode {
358381 exec_report_spec,
359382 preset,
360383 implementation_status,
384+ on_skip_only,
361385 } => {
362386 assert ! (
363387 !implementation_status. is_empty( ) ,
@@ -375,6 +399,7 @@ fn run(cli: Cli) -> ExitCode {
375399 & mut should_update_expected:: ImplementationStatusFilter {
376400 allowed : allowed_implementation_statuses,
377401 } ,
402+ on_skip_only. into ( ) ,
378403 ) {
379404 Ok ( ( ) ) => ExitCode :: SUCCESS ,
380405 Err ( AlreadyReportedToCommandline ) => ExitCode :: FAILURE ,
@@ -1417,6 +1442,7 @@ fn process_reports(
14171442 exec_report_spec : ExecReportSpec ,
14181443 preset : process_reports:: ReportProcessingPreset ,
14191444 should_update_expected : & mut dyn ShouldUpdateExpected ,
1445+ on_skip_only : process_reports:: OnSkipOnly ,
14201446) -> Result < ( ) , AlreadyReportedToCommandline > {
14211447 let exec_report_paths = exec_report_spec. paths ( ) ?;
14221448
@@ -1430,6 +1456,7 @@ fn process_reports(
14301456 preset,
14311457 should_update_expected,
14321458 meta_files_by_path,
1459+ on_skip_only,
14331460 } ) ?;
14341461
14351462 log:: debug!( "processing complete, writing new metadata to file system…" ) ;
0 commit comments