From 62a090be2fae829e79f017d5256a35a43348e75c Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 17 Oct 2026 12:37:34 +0200 Subject: [PATCH] fix: list exclusion notes only when asked --- scripts/verify.py | 6 +++++- tests/test_system_selection.py | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/scripts/verify.py b/scripts/verify.py index a7d3b74c..7ea224b2 100644 --- a/scripts/verify.py +++ b/scripts/verify.py @@ -1372,11 +1372,15 @@ def print_platform_result( _print_detail_entries(result["details"], seen_details, verbose) _print_undeclared_section(result, verbose) + # The same notes come back for every platform running these cores and + # filled 985 of the 1114 lines of verify --all: counted, listed on ask. exclusions = result.get("exclusion_notes", []) - if exclusions: + if exclusions and verbose: print(f" No external files ({len(exclusions)}):") for ex in exclusions: print(f" {ex['emulator']} -{ex['detail']} [{ex['reason']}]") + elif exclusions: + print(f" No external files: {len(exclusions)} cores (--verbose lists them)") gt_cov = result.get("ground_truth_coverage") if gt_cov and gt_cov["total"] > 0: diff --git a/tests/test_system_selection.py b/tests/test_system_selection.py index f0b2c878..9fc1b221 100644 --- a/tests/test_system_selection.py +++ b/tests/test_system_selection.py @@ -146,5 +146,22 @@ class StrictVerifyFailsOnACriticalMiss(unittest.TestCase): source = (REPO_ROOT / "scripts" / "pipeline.py").read_text() self.assertIn('"scripts/verify.py", "--all", "--strict"', source) + +class ExclusionNotesListedOnAsk(unittest.TestCase): + """verify --all repeated every core's exclusion note under every + platform: 985 of its 1114 lines, the platform results lost among them.""" + + def test_counted_by_default_listed_with_verbose(self): + if not (REPO_ROOT / "database.json").exists(): + self.skipTest("database.json is not generated") + cmd = [sys.executable, "scripts/verify.py", "--platform", "retroarch"] + plain = subprocess.run(cmd, capture_output=True, text=True, cwd=str(REPO_ROOT), + timeout=900, check=True).stdout + verbose = subprocess.run([*cmd, "--verbose"], capture_output=True, text=True, + cwd=str(REPO_ROOT), timeout=900, check=True).stdout + self.assertRegex(plain, r"No external files: \d+ cores \(--verbose lists them\)") + self.assertRegex(verbose, r"No external files \(\d+\):") + self.assertLess(len(plain.splitlines()), len(verbose.splitlines())) + if __name__ == "__main__": unittest.main()