Skip to content

Commit 9a67024

Browse files
committed
Count main targets in stable versions only
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
1 parent b3928ed commit 9a67024

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Tests/scs_cert_lib.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _resolve_spec(spec: dict):
6464
id_ = testcase['id']
6565
if id_ in testcase_lookup:
6666
raise RuntimeError(f"duplicate testcase {id_}")
67-
testcase['attn'] = 0 # count: how many versions list this in target 'main'?
67+
testcase['attn'] = 0 # count: how many stable versions list this in target 'main'?
6868
testcase_lookup[id_] = testcase
6969
tc_script_lookup[id_] = script
7070
module_lookup = {module['id']: module for module in spec['modules']}
@@ -97,8 +97,9 @@ def _resolve_spec(spec: dict):
9797
for target, tc_ids in targets.items():
9898
for tc_id in tc_ids:
9999
tc_target[tc_id] = target
100-
for tc_id in targets.get('main', ()):
101-
testcase_lookup[tc_id]['attn'] += 1
100+
if version.get('stabilized_at'):
101+
for tc_id in targets.get('main', ()):
102+
testcase_lookup[tc_id]['attn'] += 1
102103
version['targets'] = {target: sorted(tc_ids) for target, tc_ids in targets.items()}
103104
version['tc_target'] = tc_target
104105
# step 4b. resolve references to versions in timeline

0 commit comments

Comments
 (0)