@@ -2977,6 +2977,29 @@ def _arg_shown(a):
29772977
29782978]
29792979
2980+ # A section may span adjacent release lines even when individual native tests
2981+ # landed later. Filter those rows before validation so a 7.14.3 report cannot
2982+ # demand 7.15-only binaries, while 7.15 still requires the coverage.
2983+ _TEST_MIN_VERSION = {
2984+ ('Storage' , 'PinKdfRewrapsToActiveVersionAfterCorrectPin' ): '7.15.0' ,
2985+ ('Storage' , 'PinUnlocksAfterRebootUnderV17' ): '7.15.0' ,
2986+ ('Storage' , 'PinKdfV2FlagIsVersionedInV19' ): '7.15.0' ,
2987+ }
2988+
2989+
2990+ def _active_sections (fw_version ):
2991+ active = []
2992+ for letter , title , minimum , background , flow , tests in SECTIONS :
2993+ if not ver_ge (fw_version , minimum ):
2994+ continue
2995+ filtered = [
2996+ test for test in tests
2997+ if ver_ge (fw_version ,
2998+ _TEST_MIN_VERSION .get ((test [1 ], test [2 ]), minimum ))
2999+ ]
3000+ active .append ((letter , title , minimum , background , flow , filtered ))
3001+ return active
3002+
29803003# ---------------------------------------------------------------
29813004# Render
29823005# ---------------------------------------------------------------
@@ -3008,7 +3031,7 @@ def render(output_path, fw_version, results, screenshot_dir=None):
30083031 _build_frame_census (screenshot_dir )
30093032 ts = datetime .now ().strftime ('%Y-%m-%d %H:%M' )
30103033 build_label = os .environ .get ('KK_BUILD_LABEL' , '' ).strip ()
3011- active = [( l , t , mf , bg , fl , tests ) for l , t , mf , bg , fl , tests in SECTIONS if ver_ge ( fw_version , mf )]
3034+ active = _active_sections ( fw_version )
30123035 # Separate specs section (no tests) from test sections
30133036 specs = [s for s in active if not s [5 ]]
30143037
@@ -3230,7 +3253,7 @@ def screenshot_filter(fw_version):
32303253 The shell script calls this instead of maintaining a hardcoded filter.
32313254 Adding screenshots to a test in SECTIONS automatically includes it in CI Phase 1.
32323255 """
3233- active = [( l , t , mf , bg , fl , tests ) for l , t , mf , bg , fl , tests in SECTIONS if ver_ge ( fw_version , mf )]
3256+ active = _active_sections ( fw_version )
32343257 terms = []
32353258 for letter , title , mf , bg , fl , tests in active :
32363259 for tid , mod , meth , ttl , ctx , scr in tests :
@@ -3242,7 +3265,7 @@ def screenshot_filter(fw_version):
32423265
32433266def screenshot_test_list (fw_version ):
32443267 """Return exact module::method selectors consumed by conftest.py."""
3245- active = [ x for x in SECTIONS if ver_ge (fw_version , x [ 2 ])]
3268+ active = _active_sections (fw_version )
32463269 pairs = set ()
32473270 for _letter , _title , _mf , _bg , _fl , tests in active :
32483271 for _tid , mod , meth , _ttl , _ctx , screens in tests :
@@ -3305,7 +3328,7 @@ def screenshot_audit(fw_version, screenshot_root, junit_path=None):
33053328 mod = next ((p for p in cn .split ('.' ) if p .startswith ('test_' )), '' )
33063329 skipped .add ((mod , tc .get ('name' )))
33073330
3308- active = [ x for x in SECTIONS if ver_ge (fw_version , x [ 2 ])]
3331+ active = _active_sections (fw_version )
33093332 missing = []
33103333 for letter , title , mf , bg , fl , tests in active :
33113334 for tid , mod , meth , ttl , ctx , scr in tests :
@@ -3328,7 +3351,7 @@ def validate_junit(fw_version, results, variant='full'):
33283351 Tests that were skipped (gated by requires_message/requires_firmware) are OK,
33293352 unless their module is in MUST_RUN_MODULES.
33303353 """
3331- active = [( l , t , mf , bg , fl , tests ) for l , t , mf , bg , fl , tests in SECTIONS if ver_ge ( fw_version , mf )]
3354+ active = _active_sections ( fw_version )
33323355 failures = []
33333356 for letter , title , mf , bg , fl , tests in active :
33343357 for tid , mod , meth , ttl , ctx , scr in tests :
0 commit comments