diff --git a/scripts/pipeline.py b/scripts/pipeline.py index e46ed4f2..aa815ed4 100644 --- a/scripts/pipeline.py +++ b/scripts/pipeline.py @@ -33,7 +33,7 @@ come from .cache/large/ only. Usage: python scripts/pipeline.py # active platforms python scripts/pipeline.py --include-archived # all platforms - python scripts/pipeline.py --skip-packs # steps 1 to 3b, then 7 and 8 + python scripts/pipeline.py --skip-packs # steps 0 to 3b, 4d, 7 and 8 python scripts/pipeline.py --skip-docs # skip steps 7 and 8 python scripts/pipeline.py --offline # no network, see above """ @@ -427,7 +427,9 @@ def main() -> None: parser.add_argument( "--skip-packs", action="store_true", - help="Only regenerate DB and verify, skip pack generation", + help="Skip steps 4 to 6 except 4d: packs, manifests and their checks. " + "Steps 7 and 8 still rewrite README.md and docs/, add --skip-docs to " + "stop after verify", ) parser.add_argument( "--skip-docs", action="store_true", help="Skip README and site generation" diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index 52d40241..4d4ae2eb 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -6026,5 +6026,24 @@ class ToolsRunFromAnyDirectory(unittest.TestCase): self.assertTrue(Path(tmp, "lists", "retroarch.json").is_file()) +class SkipPacksHelpSaysWhatRuns(unittest.TestCase): + """--help said "Only regenerate DB and verify" while the run went on to + rewrite derivable.json, README.md and docs/.""" + + def test_the_help_names_the_steps_that_still_run(self): + proc = subprocess.run( + [sys.executable, "scripts/pipeline.py", "--help"], + cwd=ROOT, capture_output=True, text=True, timeout=60, check=True, + ) + text = " ".join(proc.stdout.split()) + self.assertNotIn("Only regenerate DB and verify", text) + self.assertIn("Steps 7 and 8 still rewrite README.md and docs/", text) + + def test_every_step_it_names_is_one_it_skips(self): + source = (ROOT / "scripts" / "pipeline.py").read_text(encoding="utf-8") + skipped = set(re.findall(r"--- (\w+)/8 [^\n]*SKIPPED \(--skip-packs\)", source)) + self.assertEqual(skipped, {"4", "4b", "4c", "6"}) + + if __name__ == "__main__": unittest.main() diff --git a/wiki/tools.md b/wiki/tools.md index 3db2d9df..06731d05 100644 --- a/wiki/tools.md +++ b/wiki/tools.md @@ -53,7 +53,7 @@ Pipeline flags: | Flag | Effect | |------|--------| | `--offline` | skip every step that needs the network (2, 2a, 2a2, 2b, 2b2) | -| `--skip-packs` | skip steps 4, 4b, 4c, 6 and the consistency check | +| `--skip-packs` | skip steps 4, 4b, 4c, 6 and the consistency check. README and site are still rewritten unless `--skip-docs` is given too | | `--skip-docs` | skip steps 7 and 8 | | `--include-archived` | include archived platforms in verify, packs, truth and export | | `--target TARGET` | filter verify, packs and truth by hardware target |