Commit Graph
14 Commits
Author SHA1 Message Date
Abdessamad Derraz 9814bb1234 refactor: step 5 reads counts both tools record 2026-11-21 19:50:42 +01:00
Abdessamad Derraz 83f7693ccb refactor: return the emulator pack outcome 2026-11-21 16:43:46 +01:00
Abdessamad Derraz 985d07b97e refactor: move pipeline steps into orchestrate 2026-11-21 14:58:02 +01:00
Abdessamad Derraz fbbb941e38 refactor: one owner for the test scratch folder
Test modules passed dir= the repository's tmp/ or a hard-coded tmp/tests by hand, and seven modules kept their own _tempdir copy. Under run_tests.py the literal tmp/tests did not exist in a fresh clone (FileNotFoundError in test_core_probe and scratch_checkout), and dir=tmp/ wrote beside the per-module scratch folders. Every temporary directory now lands in the folder tests/__init__ sets, and scratch_dir() replaces the copies. The X socket binds by a relative name, since a scratch path can exceed the 108-byte AF_UNIX limit. The journeys keep the short tmp/ root: their word budgets count the printed card path.
2026-11-21 06:04:40 +01:00
Abdessamad Derraz 3853ca2f1c refactor: public names for cross-module reads 2026-11-18 22:59:51 +01:00
Abdessamad Derraz 0b532366d0 refactor: move pack library code into packs/ 2026-11-18 13:47:31 +01:00
Abdessamad Derraz 83cfa6fd0f refactor: split common.py into three packages
core: cli (run_cli, input errors, name hints), github (token), paths.
model: sources, database, composition, registry, platforms,
declarations, targets, systems, profiles, cliargs. resolve: content,
ownership, datadirs, archives, localfile, directories, layout,
contentlayout, standalone, grouping, cores.

Definitions move verbatim; common.py and its re-exports are gone and
every importer, patch target and code-in-string names the new home. A
test that stubbed common.load_platform_config stubs each module that
reads the loader by its own name.
2026-11-18 11:09:13 +01:00
Abdessamad Derraz 5f18caec31 refactor: put scripts/ on the test path once
tests/__init__ now puts the repository root and scripts/ on sys.path,
so no test module inserts them and every import sits in the import
block. ruff accepts the bare `import tests` the modules keep for its
side effects. The last suppressions go: helper test modules import as
tests.<name>, files open in with blocks, lambdas become functions.
2026-11-17 16:11:23 +01:00
Abdessamad Derraz 057fd2d0f6 fix: isolate every test module however it runs
tests/__init__.py keeps a run offline, its scratch under tmp/ and its
installer cache its own, but only discover -s tests -t . imported it.
discover tests ran with RETROBIOS_OFFLINE unset, scratch on the /tmp
tmpfs and the user's real installer cache, the setting in which e2e
fixtures had written into the shared .cache/large. Every test module now
imports the package first, and a test fails on a module that does not.
test_verify_listing.py took its line with the previous commit.
2026-11-06 15:14:05 +01:00
Abdessamad Derraz cead17429b fix: compare narrowed emulator packs in step 5 2026-11-06 03:51:52 +01:00
Abdessamad Derraz d265453b32 feat: compare narrowed packs with verify
Step 5 builds the --required-only, --no-game-data, --region, --target
and --system packs of every platform in memory and compares their paths
with verify run under the same narrowing. verify_platform gains
required_only, generate_pack a record mode. A run samples three regions,
targets and systems per platform (155 packs, about 3 minutes);
--full-narrowings compares all 1,150 (25 minutes). A test fails when
_narrowings() gains a dimension that is neither compared nor exempted.
2026-11-06 00:07:40 +01:00
Abdessamad Derraz c1f0e8c2ca fix: compare system packs in pipeline step 5
Step 5 built emulator packs one profile at a time, where two profiles never share a path. It now also builds each system pack that gathers several profiles and compares it with verify. The first run found five standalone MSX and ColecoVision packs where verify skipped the data tree of a profile the system filter left without files, and credited msx-emu's copies the pack never wrote. verify now places those trees too: 541 system packs, all equal.
2026-11-05 19:45:39 +01:00
Abdessamad Derraz 4ba935374e fix: keep pack order outside contested paths
Ranking contested core claims sorted the whole gap report, which
reordered every manifest. Only the claims on one contested path move now,
grouped where the first of them stood, and two spellings of a path are
one group where the filesystem folds case (RetroBat's 64DD_IPL_DEV.bin).

An entry without a destination (EmuDeck's system:md5 whitelist) no
longer counts as a pack path in verify, and step 5 prints one status for
counts and paths together. A full offline run compared all 12 archives
and 930 emulator packs path by path, every one equal.
2026-10-21 06:47:44 +02:00
Abdessamad Derraz 38af19091d fix: compare pack paths, not only counts
Step 5 compared (ok, total) and the core file count. RetroArch, Lakka
and RetroPie read 526/526 on both sides while verify credited four paths
below SGB1.sfc and SGB2.sfc that the pack never writes: a declared file
blocks them as a directory. verify now places the platform files in the
builder's order with the same path rules, and a user_provided or
external declaration keeps its slot on both sides, so no core file takes
it in the report only.

verify --destinations writes the paths each pack holds by the report,
and step 5 compares them with the archive members (notes and data tree
members set aside). Every emulator profile, in each build it has, is
built in memory (PackRecord, nothing read or written) and compared with
verify --emulator path by path. Cost measured here: about 1 s per
platform archive and 11 s for the 930 emulator packs.
2026-10-21 05:18:02 +02:00