@@ -8,7 +8,7 @@ use self::{
88 BuildProfile , File , FileProps , Platform , Subtest , SubtestOutcome , Test , TestOutcome ,
99 TestProps ,
1010 } ,
11- process_reports:: { Entry , MaybeDisabled , TestEntry } ,
11+ process_reports:: { Entry , TestEntry } ,
1212 report:: {
1313 ExecutionReport , RunInfo , SubtestExecutionResult , TestExecutionEntry , TestExecutionResult ,
1414 } ,
@@ -340,11 +340,7 @@ fn run(cli: Cli) -> ExitCode {
340340
341341 for ( SectionHeader ( name) , test) in tests {
342342 let Test {
343- properties :
344- TestProps {
345- is_disabled,
346- expectations,
347- } ,
343+ properties,
348344 subtests,
349345 } = test;
350346
@@ -364,12 +360,7 @@ fn run(cli: Cli) -> ExitCode {
364360 let test_path = & test_path;
365361 let mut reported_dupe_already = false ;
366362
367- let maybe_disabled = if is_disabled {
368- MaybeDisabled :: Disabled
369- } else {
370- MaybeDisabled :: Enabled ( expectations)
371- } ;
372- if let Some ( _old) = test_entry. metadata . replace ( maybe_disabled) {
363+ if let Some ( _old) = test_entry. meta_props . replace ( properties) {
373364 freak_out_do_nothing (
374365 & lazy_format ! (
375366 "duplicate entry for {test_path:?}, discarding previous entries with this and further dupes"
@@ -379,21 +370,10 @@ fn run(cli: Cli) -> ExitCode {
379370 }
380371
381372 for ( SectionHeader ( subtest_name) , subtest) in subtests {
382- let Subtest {
383- properties :
384- TestProps {
385- is_disabled,
386- expectations,
387- } ,
388- } = subtest;
373+ let Subtest { properties } = subtest;
389374 let subtest_entry =
390375 subtest_entries. entry ( subtest_name. clone ( ) ) . or_default ( ) ;
391- let maybe_disabled = if is_disabled {
392- MaybeDisabled :: Disabled
393- } else {
394- MaybeDisabled :: Enabled ( expectations)
395- } ;
396- if let Some ( _old) = subtest_entry. metadata . replace ( maybe_disabled) {
376+ if let Some ( _old) = subtest_entry. meta_props . replace ( properties) {
397377 if !reported_dupe_already {
398378 freak_out_do_nothing ( & lazy_format ! (
399379 "duplicate subtest in {test_path:?} named {subtest_name:?}, discarding previous entries with this and further dupes"
@@ -533,19 +513,18 @@ fn run(cli: Cli) -> ExitCode {
533513 where
534514 Out : Debug + Default + EnumSetType ,
535515 {
536- let Entry { metadata, reported } = entry;
537-
538- let metadata = metadata
539- . map ( |maybe_disabled| {
540- maybe_disabled. map_enabled ( |opt| opt. unwrap_or_default ( ) )
541- } )
542- . unwrap_or_default ( ) ;
543-
516+ let Entry {
517+ meta_props,
518+ reported,
519+ } = entry;
544520 let normalize = NormalizedExpectationPropertyValue :: from_fully_expanded;
545521
546- let reconciled_expectations = metadata. map_enabled ( |metadata| {
522+ let mut meta_props = meta_props. unwrap_or_default ( ) ;
523+ meta_props. expectations = Some ( ' resolve: {
547524 let resolve = match preset {
548- ReportProcessingPreset :: ResetAll => return normalize ( reported) ,
525+ ReportProcessingPreset :: ResetAll => {
526+ break ' resolve normalize ( reported) ;
527+ }
549528 ReportProcessingPreset :: ResetContradictory => {
550529 |meta : Expectation < _ > , rep : Option < Expectation < _ > > | {
551530 rep. filter ( |rep| !meta. is_superset ( rep) ) . unwrap_or ( meta)
@@ -565,7 +544,11 @@ fn run(cli: Cli) -> ExitCode {
565544 (
566545 build_profile,
567546 resolve (
568- metadata. get ( platform, build_profile) ,
547+ meta_props
548+ . expectations
549+ . as_ref ( )
550+ . unwrap_or ( & Default :: default ( ) )
551+ . get ( platform, build_profile) ,
569552 reported
570553 . get ( & platform)
571554 . and_then ( |rep| {
@@ -581,17 +564,7 @@ fn run(cli: Cli) -> ExitCode {
581564 . collect ( ) ,
582565 )
583566 } ) ;
584-
585- match reconciled_expectations {
586- MaybeDisabled :: Disabled => TestProps {
587- is_disabled : true ,
588- expectations : Default :: default ( ) ,
589- } ,
590- MaybeDisabled :: Enabled ( expectations) => TestProps {
591- is_disabled : false ,
592- expectations : Some ( expectations) ,
593- } ,
594- }
567+ meta_props
595568 }
596569
597570 let TestEntry {
0 commit comments