mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 09:23:26 -05:00
fix: show exclusions and every verify-packs error
This commit is contained in:
1 parent
c4c87a5f7a
commit
09eb4f4ef3
2 files changed
+22
-5
No files matched your search
@@ -2418,18 +2418,20 @@ def _run_verify_packs(args):
|
|||||||
data_registry=verify_data_registry,
|
data_registry=verify_data_registry,
|
||||||
target_cores=tc,
|
target_cores=tc,
|
||||||
)
|
)
|
||||||
ok, errors = result[0], result[3]
|
(ok, _checked, _present, errors, bl_checked, bl_present,
|
||||||
bl_checked, bl_present = result[4], result[5]
|
core_checked, core_present, bl_excluded) = result
|
||||||
core_checked, core_present = result[6], result[7]
|
# The unsafe exclusions explain a baseline short of its total: a
|
||||||
|
# dump whose hash the frontend refuses is left out on purpose.
|
||||||
|
excluded = f" ({bl_excluded} unsafe excluded)" if bl_excluded else ""
|
||||||
counts = (
|
counts = (
|
||||||
f"{bl_present}/{bl_checked} baseline, "
|
f"{bl_present}/{bl_checked} baseline{excluded}, "
|
||||||
f"{core_present}/{core_checked} cores"
|
f"{core_present}/{core_checked} cores"
|
||||||
)
|
)
|
||||||
if ok:
|
if ok:
|
||||||
print(f" {platform_name} [{pack_name}]: OK ({counts})")
|
print(f" {platform_name} [{pack_name}]: OK ({counts})")
|
||||||
else:
|
else:
|
||||||
print(f" {platform_name} [{pack_name}]: FAIL ({counts}, {len(errors)} errors)")
|
print(f" {platform_name} [{pack_name}]: FAIL ({counts}, {len(errors)} errors)")
|
||||||
for err in errors[:5]:
|
for err in errors:
|
||||||
print(f" {err}")
|
print(f" {err}")
|
||||||
all_ok = False
|
all_ok = False
|
||||||
|
|
||||||
|
|||||||
@@ -3529,5 +3529,20 @@ class TheTestJobHasTheDataTrees(unittest.TestCase):
|
|||||||
self.assertLess(fetch, suite)
|
self.assertLess(fetch, suite)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class VerifyPacksSaysWhatItExcluded(unittest.TestCase):
|
||||||
|
"""--verify-packs read the result tuple by position, dropped the unsafe
|
||||||
|
exclusions (352/353 shown as OK with no reason) and printed 5 errors."""
|
||||||
|
|
||||||
|
def test_the_result_is_unpacked_whole_and_every_error_printed(self):
|
||||||
|
source = (ROOT / "scripts" / "generate_pack.py").read_text()
|
||||||
|
body = source[source.index("def _run_verify_packs"):]
|
||||||
|
body = body[:body.index("\ndef ")]
|
||||||
|
self.assertIn("bl_excluded) = result", body)
|
||||||
|
self.assertIn("unsafe excluded", body)
|
||||||
|
self.assertNotIn("errors[:5]", body)
|
||||||
|
self.assertNotRegex(body, r"result\[\d\]")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
Reference in new issue
Block a user