From 51aa626028a695adac2403f15a8d61d4b35f3559 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Mon, 9 Nov 2026 12:45:57 +0100 Subject: [PATCH] fix: fetch platform originals without exporting --fetch also exported and stopped on the absent dist/truth before any download, so CI skipped every exporter fidelity case and tolerated the step. --refresh-cache only downloads: the step can no longer fail unseen. --- .github/workflows/validate.yml | 10 +++++----- scripts/pr_checks.py | 4 ++-- tests/test_contributing_text.py | 1 - wiki/release-process.md | 2 +- wiki/testing-guide.md | 6 +++--- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 8a75a5dee..56ec2698f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -278,12 +278,12 @@ jobs: - run: npm ci --prefix website # The exporter fidelity cases compare what we hand back against the - # file each platform publishes, so they need those files. They skip - # without them rather than fail, which is why an unreachable upstream - # must not stop the run: the rest of the suite still has to report. + # file each platform publishes, so they need those files. --fetch + # exported as well and stopped on the absent dist/truth before any + # download, so the cases skipped on every run: --refresh-cache only + # downloads them. - name: Fetch the platforms' own files - continue-on-error: true - run: python scripts/export_native.py --all --fetch --output-dir "$RUNNER_TEMP/native" + run: python scripts/export_native.py --all --refresh-cache # A pack built without its data directories exits non-zero: it is not # the pack a user gets. Tests that build packs need the same trees a diff --git a/scripts/pr_checks.py b/scripts/pr_checks.py index e84005e5b..4a4b838e2 100644 --- a/scripts/pr_checks.py +++ b/scripts/pr_checks.py @@ -50,8 +50,8 @@ STEPS: tuple[Step, ...] = ( needs="vermin", provider="the pip line of CONTRIBUTING.md"), Step("shellcheck --version", "the launcher test runs shellcheck", needs="shellcheck", provider="the shellcheck package"), - Step("python scripts/export_native.py --all --fetch --output-dir tmp/native", - "files the exporter tests compare with", may_fail=True), + Step("python scripts/export_native.py --all --refresh-cache", + "files the exporter tests compare with"), Step("python scripts/refresh_data_dirs.py", "data directories the pack-building tests read"), Step("python scripts/generate_site.py", "the pages the site tests read"), Step("npm ci --prefix website", "the site's packages, Node 24", diff --git a/tests/test_contributing_text.py b/tests/test_contributing_text.py index 12431f02d..74d2b6348 100644 --- a/tests/test_contributing_text.py +++ b/tests/test_contributing_text.py @@ -240,7 +240,6 @@ class OneCommandRunsTheChecks(unittest.TestCase): workflow = (REPO_ROOT / ".github" / "workflows" / "validate.yml").read_text(encoding="utf-8") tolerated = set(re.findall(r"continue-on-error: true\n\s*run: (\S+ \S+)", workflow)) - self.assertTrue(tolerated) for step in pr_checks.STEPS: with self.subTest(step=step.command): self.assertEqual(step.may_fail, " ".join(step.command.split()[:2]) in tolerated) diff --git a/wiki/release-process.md b/wiki/release-process.md index 8de045b59..1384801be 100644 --- a/wiki/release-process.md +++ b/wiki/release-process.md @@ -144,7 +144,7 @@ upstream. An edited profile is not held to it. **run-tests.** On Python 3.8, 3.9 and 3.12: holds `install.py` to 3.8 with `vermin`, sets up bubblewrap for the sandbox tests, fetches the platforms' own -files (allowed to fail, the fidelity tests then skip) and the data +files (`export_native.py --all --refresh-cache`, for the fidelity tests) and the data directories, generates the site, then runs `python -m unittest discover -s tests -t . -v` with `RETROBIOS_OFFLINE=1`, the full-screen installer tests again under 3.8, and the site build diff --git a/wiki/testing-guide.md b/wiki/testing-guide.md index df3807e0b..a7f5362ca 100644 --- a/wiki/testing-guide.md +++ b/wiki/testing-guide.md @@ -540,9 +540,9 @@ of main passes, not every commit under it. Modules that need real artifacts skip themselves when those artifacts are absent, so `test_pack_integrity` is a no-op in CI (no `dist/`) and a real check locally. The exporter fidelity cases go the other way: they compare with each platform's -own file, which `python scripts/export_native.py --all --fetch --output-dir -tmp/native` downloads into `.cache/upstream-native/`. CI runs it before the -suite, and a clone without that cache skips them. +own file, which `python scripts/export_native.py --all --refresh-cache` +downloads into `.cache/upstream-native/`. CI runs it before the suite, and a +clone without that cache skips them. Run `python -m unittest discover -s tests -t .` before pushing. Tests must pass before merge. If a test fails in CI, reproduce locally with: