From 25d35fcc0f03b764afa8fec6908d467eff4a58b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCchse?= Date: Tue, 27 Jan 2026 22:06:48 +0100 Subject: [PATCH] Fix: CM details page list unused testcases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For instance, the testcase scs-0104-image-debian-13 is not (yet) used by any version. Or the testcase scs-0104-image-capi-1 is only used by deprecated versions, and those are not shown if an effective version is passed. Showing these unused testcases in the table accomplished nothing but confusion. Signed-off-by: Matthias Büchse --- compliance-monitor/monitor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compliance-monitor/monitor.py b/compliance-monitor/monitor.py index 6b0ebf90b..ba3fbc0c3 100755 --- a/compliance-monitor/monitor.py +++ b/compliance-monitor/monitor.py @@ -279,6 +279,11 @@ def _evaluate_scope(spec, scope_results, include_drafts=False): if include_drafts: relevant.extend(by_validity['draft']) passed = [vname for vname in relevant if version_results[vname]['result'] == 1] + # only list testcases that occur in any relevant version + relevant_testcases = set() + for vname in relevant: + for tc_ids in versions[vname]['targets'].values(): + relevant_testcases.update(tc_ids) return { 'name': spec['name'], 'testcases': testcases, @@ -286,7 +291,7 @@ def _evaluate_scope(spec, scope_results, include_drafts=False): 'buckets': { # sort testcase that occur any main target on top of those that don't res: sorted(tc_ids, key=lambda tc_id: (not testcases[tc_id]['attn'], tc_id)) - for res, tc_ids in eval_buckets(scope_results, testcases).items() + for res, tc_ids in eval_buckets(scope_results, relevant_testcases).items() }, 'versions': version_results, 'relevant': relevant,