fix: read the upstream cache from one name

This commit is contained in:
Abdessamad Derraz committed 2026-10-10 04:41:39 +02:00
1 parent 537600730c
commit 788a6dd4df
5 files changed
+8 -5

No files matched your search

+1 -1
View File
@@ -1057,7 +1057,7 @@ def main() -> int:
parser.add_argument("--profiles", action="store_true", help="also run profile_sync (slow)")
parser.add_argument("--offline", action="store_true", help="no network, local ages only")
parser.add_argument("--jobs", type=int, default=4, help="parallel scrapers")
parser.add_argument("--cache-dir", default=".cache/upstream")
parser.add_argument("--cache-dir", default=upstream.CACHE_DIR)
parser.add_argument("--native-cache-dir", default=export_native.DEFAULT_CACHE)
parser.add_argument("--truth-dir", default="dist/truth")
parser.add_argument("--platforms-dir", default="platforms")
+1 -1
View File
@@ -115,7 +115,7 @@ def main() -> None:
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
parser.add_argument("emulators", nargs="+")
parser.add_argument("--emulators-dir", default="emulators")
parser.add_argument("--cache-dir", default=".cache")
parser.add_argument("--cache-dir", default=upstream.CACHE_DIR)
parser.add_argument("--offline", action="store_true")
parser.add_argument("--write", action="store_true")
args = parser.parse_args()
+1 -1
View File
@@ -31,7 +31,7 @@ import upstream
from common import load_emulator_profiles
from upstream import CompareResult, find_renamed
DEFAULT_CACHE = ".cache/upstream"
DEFAULT_CACHE = upstream.CACHE_DIR
ANON_QUOTA = 60
TRIAGE_PATH_SAMPLE = 5
+2
View File
@@ -21,6 +21,8 @@ from dataclasses import dataclass
from pathlib import Path
USER_AGENT = "retrobios-profile-sync/1.0"
# Where fetched upstream files live, shared by every reader of this cache.
CACHE_DIR = ".cache/upstream"
ABSENT = "\0absent\0"
GITHUB_COMPARE_CAP = 300
RETRIES = 3
+3 -2
View File
@@ -112,12 +112,13 @@ class TestCorpusStaysCorrect(unittest.TestCase):
"""
def test_every_mame_family_ref_names_its_own_set(self):
if not (ROOT / ".cache").is_dir():
cache = ROOT / mame_ref_audit.upstream.CACHE_DIR
if not cache.is_dir():
self.skipTest("no upstream cache")
for name in ("mame", "mamearcade", "mamemess", "groovymame"):
with self.subTest(emulator=name):
findings, agreed, _ = mame_ref_audit.audit(
name, str(ROOT / "emulators"), str(ROOT / ".cache"), True
name, str(ROOT / "emulators"), str(cache), True
)
if not agreed and not findings:
self.skipTest(f"{name}: driver sources not cached")