@@ -122,6 +122,9 @@ enum Subcommand {
122122 /// `implementation-status`es that changes should be applied to.
123123 #[ clap( value_enum, long, default_value = "backlog" ) ]
124124 implementation_status : Vec < ImplementationStatus > ,
125+ /// What do when only `SKIP` outcomes are found for tests and subtests.
126+ #[ clap( value_enum, long, default_value_t = OnSkipOnly :: Reconcile ) ]
127+ on_skip_only : OnSkipOnly ,
125128 } ,
126129 /// Parse test metadata, apply automated fixups, and re-emit it in normalized form.
127130 #[ clap( name = "fixup" , alias = "fmt" ) ]
@@ -196,6 +199,24 @@ impl From<UpdateExpectedPreset> for process_reports::ReportProcessingPreset {
196199 }
197200}
198201
202+ /// See [`Subcommand::UpdateExpected::on_skip_only`].
203+ #[ derive( Clone , Copy , Debug , ValueEnum ) ]
204+ pub ( crate ) enum OnSkipOnly {
205+ /// Use reconcilation from the provided `--preset` with `SKIP` outcomes.
206+ Reconcile ,
207+ /// Do not change metadata.
208+ Ignore ,
209+ }
210+
211+ impl From < OnSkipOnly > for process_reports:: OnSkipOnly {
212+ fn from ( value : OnSkipOnly ) -> Self {
213+ match value {
214+ OnSkipOnly :: Ignore => Self :: Ignore ,
215+ OnSkipOnly :: Reconcile => Self :: Reconcile ,
216+ }
217+ }
218+ }
219+
199220#[ derive( Clone , Copy , Debug , Default , ValueEnum ) ]
200221enum OnZeroItem {
201222 Show ,
@@ -263,6 +284,7 @@ fn run(cli: Cli) -> ExitCode {
263284 exec_report_spec,
264285 process_reports:: ReportProcessingPreset :: MigrateTestStructure ,
265286 & mut should_update_expected:: NeverUpdateExpected ,
287+ OnSkipOnly :: Reconcile . into ( ) ,
266288 ) {
267289 Ok ( ( ) ) => ExitCode :: SUCCESS ,
268290 Err ( AlreadyReportedToCommandline ) => ExitCode :: FAILURE ,
@@ -271,6 +293,7 @@ fn run(cli: Cli) -> ExitCode {
271293 exec_report_spec,
272294 preset,
273295 implementation_status,
296+ on_skip_only,
274297 } => {
275298 assert ! (
276299 !implementation_status. is_empty( ) ,
@@ -288,6 +311,7 @@ fn run(cli: Cli) -> ExitCode {
288311 & mut should_update_expected:: ImplementationStatusFilter {
289312 allowed : allowed_implementation_statuses,
290313 } ,
314+ on_skip_only. into ( ) ,
291315 ) {
292316 Ok ( ( ) ) => ExitCode :: SUCCESS ,
293317 Err ( AlreadyReportedToCommandline ) => ExitCode :: FAILURE ,
@@ -1322,6 +1346,7 @@ fn process_reports(
13221346 exec_report_spec : ExecReportSpec ,
13231347 preset : process_reports:: ReportProcessingPreset ,
13241348 should_update_expected : & mut dyn ShouldUpdateExpected ,
1349+ on_skip_only : process_reports:: OnSkipOnly ,
13251350) -> Result < ( ) , AlreadyReportedToCommandline > {
13261351 let exec_report_paths = exec_report_spec. paths ( ) ?;
13271352
@@ -1335,6 +1360,7 @@ fn process_reports(
13351360 preset,
13361361 should_update_expected,
13371362 meta_files_by_path,
1363+ on_skip_only,
13381364 } ) ?;
13391365
13401366 log:: debug!( "processing complete, writing new metadata to file system…" ) ;
0 commit comments