mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 18:47:53 -06:00
fix: site reads core file counts from verify
compute_coverage recounted the gap entries: one per entry, not one per pack path, with held-but-unplaced and bundled files counted missing. RetroArch read 7956 packed and 419 missing where verify says 7977 and 66. packs/shares.py holds the split both now read.
This commit is contained in:
1 parent
d1b0c77039
commit
2f9cfc8e8d
12 files changed
+168
-94
No files matched your search
+1
-1
@@ -25,7 +25,7 @@ COMMANDS = {
|
||||
),
|
||||
"verify.py": (
|
||||
"packs/verdicts.py", "packs/gaps.py", "packs/coverage.py", "packs/emulatorcheck.py",
|
||||
"packs/report.py", "packs/verifyplatforms.py", "packs/verifysummary.py",
|
||||
"packs/report.py", "packs/shares.py", "packs/verifyplatforms.py", "packs/verifysummary.py",
|
||||
"packs/verifyoutput.py", "packs/strictgate.py", "packs/verifyoptions.py",
|
||||
"packs/verifyprint.py", "packs/runscope.py", "packs/verifyrun.py",
|
||||
),
|
||||
|
||||
@@ -5511,11 +5511,11 @@ class BundledFilesAreNotToSource(unittest.TestCase):
|
||||
|
||||
def test_verify_does_not_count_it_missing(self):
|
||||
from packs import verifysummary
|
||||
from packs import report as packs_report
|
||||
from packs import shares as packs_shares
|
||||
|
||||
entry = {"name": "n64.psh", "required": True, "in_repo": False,
|
||||
"category": "bios", "in_pack": True, "bundled": True}
|
||||
self.assertEqual(packs_report.core_required_missing([entry]), [])
|
||||
self.assertEqual(packs_shares.core_required_missing([entry]), [])
|
||||
summary = verifysummary.overall_summary(
|
||||
[({"severity_counts": {}, "undeclared_files": [entry]}, ["ROCKNIX"])]
|
||||
)
|
||||
|
||||
@@ -95,6 +95,7 @@ class SiteReferenceContracts(unittest.TestCase):
|
||||
"missing": 0,
|
||||
"core_present": 1,
|
||||
"core_missing": 0,
|
||||
"core_unplaced": 0,
|
||||
"core_unsourceable": 0,
|
||||
"details": [],
|
||||
}
|
||||
|
||||
@@ -301,7 +301,8 @@ class PlatformReferenceInWords(unittest.TestCase):
|
||||
details = [{"name": "f.bin", "status": "ok", "system": "sony-playstation"}]
|
||||
cov = {"platform": "RomM", "details": details, "total": 1, "verified": 1,
|
||||
"present": 1, "missing": 0, "untested": 0, "mode": "md5",
|
||||
"core_present": 0, "core_missing": 0, "core_unsourceable": 0,
|
||||
"core_present": 0, "core_missing": 0, "core_unplaced": 0,
|
||||
"core_unsourceable": 0,
|
||||
"config": {"hash_type": "md5", "hash_rule": "size_and_any_hash",
|
||||
"systems": {"sony-playstation": {"files": [{"name": "f.bin"}]}},
|
||||
"source": "https://github.com/o/r/tree/" + "a" * 40}}
|
||||
|
||||
@@ -103,7 +103,24 @@ class SlugPlatform(unittest.TestCase):
|
||||
"slugs", "platforms", self.db, emulators_dir="emulators"
|
||||
)
|
||||
self.assertEqual(coverage["core_present"], 0)
|
||||
self.assertEqual(coverage["core_missing"], 1)
|
||||
# Held, so not missing: verify prints it apart, and so does the site.
|
||||
self.assertEqual((coverage["core_missing"], coverage["core_unplaced"]), (0, 1))
|
||||
|
||||
def test_the_site_reads_verify_counts(self):
|
||||
# Recounted from the gap entries, the site said 7956 packed and 419
|
||||
# missing for RetroArch where verify said 7977 and 66.
|
||||
from packs.shares import core_shares
|
||||
from sitegen.coverage import compute_coverage
|
||||
|
||||
report = verify_platform(self.config, self.db, "emulators", self.profiles)
|
||||
shares = core_shares(report)
|
||||
coverage = compute_coverage(
|
||||
"slugs", "platforms", self.db, emulators_dir="emulators"
|
||||
)
|
||||
self.assertEqual(
|
||||
(coverage["core_present"], coverage["core_missing"], coverage["core_unplaced"]),
|
||||
(shares.packed, shares.missing, shares.held_unplaced),
|
||||
)
|
||||
|
||||
def test_the_manifest_says_why_it_is_absent(self):
|
||||
manifest = packs_manifest.generate_manifest(
|
||||
|
||||
Reference in new issue
Block a user