mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 01:13:30 -05:00
fix: list exclusion notes only when asked
This commit is contained in:
1 parent
f6b808b1d9
commit
62a090be2f
2 files changed
+22
-1
No files matched your search
+5
-1
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
Reference in new issue
Block a user