diff --git a/scripts/pipeline.py b/scripts/pipeline.py index 9f89b4cd..4a4dd066 100644 --- a/scripts/pipeline.py +++ b/scripts/pipeline.py @@ -622,8 +622,9 @@ def _truth_steps(args: argparse.Namespace, results: dict) -> bool: sys.executable, "scripts/export_native.py", "--all", - "--output-dir", - str(Path(args.output_dir) / "upstream"), + # exports/ is committed with the code, like README.md and + # install/: written under the pack directory it went stale on + # every green run. "--truth-dir", str(Path(args.output_dir) / "truth"), ] diff --git a/tests/test_tool_messages.py b/tests/test_tool_messages.py index 5fcd1379..9a5731df 100644 --- a/tests/test_tool_messages.py +++ b/tests/test_tool_messages.py @@ -172,6 +172,24 @@ class OneSpellingPerOption(unittest.TestCase): self.assertEqual(missing, []) +class ThePipelineRefreshesTheCommittedExport(unittest.TestCase): + """Step 2e wrote to /upstream while exports/ is the copy the + site and the platforms read, so a green run left it stale.""" + + def test_the_export_step_writes_the_default_directory(self): + import ast + + source = (REPO_ROOT / "scripts" / "pipeline.py").read_text(encoding="utf-8") + for node in ast.walk(ast.parse(source)): + if (isinstance(node, ast.Assign) + and any(getattr(t, "id", "") == "export_cmd" for t in node.targets)): + words = [getattr(e, "value", None) for e in node.value.elts] + self.assertIn("scripts/export_native.py", words) + self.assertNotIn("--output-dir", words) + return + self.fail("no export_cmd in pipeline.py") + + class ThePipelineCountsItsRealSteps(unittest.TestCase): """Labels read N/8 for a run of 24 steps, and the summary used keys the log never printed."""