From 8241bd53b179cf8332541264c3bf12b8e3eca44a Mon Sep 17 00:00:00 2001 From: Godopu Date: Thu, 8 Oct 2026 08:14:05 +0900 Subject: [PATCH] test(issue-17): the failing wait-rc test sources the wrapper in its own WORKSPACE_ROOT Sourcing the wrapper sources lib.sh, which writes $WORKSPACE_ROOT/.mam/shim/ herdr; without WORKSPACE_ROOT that is the checkout. The new N2 wait-rc test now runs with its tmp dir as WORKSPACE_ROOT, so the N2 tests leave the checkout untouched. (The existing C tests in this file still write the checkout's .mam/shim/herdr, as at 56d0bfd - not changed here.) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HCGpJXhSZasJLU38ksDghe --- tests/test_issue17_item4_decisions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_issue17_item4_decisions.py b/tests/test_issue17_item4_decisions.py index a3428c7..49b8dcf 100644 --- a/tests/test_issue17_item4_decisions.py +++ b/tests/test_issue17_item4_decisions.py @@ -689,7 +689,7 @@ def test_f_a_failed_wait_rc_ends_wait_with_1(tmp_path, mode): py = _failing_py(tmp_path, "wait-rc", mode) script = f'source "{WRAPPER}"; PY="{py}"; set +e; (cmd_wait --job j1 --timeout 5); echo "rc=$?"' res = subprocess.run(["bash", "-c", script], capture_output=True, text=True, cwd=str(tmp_path), timeout=60, - env=_env(tmp_path, SUB_STANDIN=1, SUB_RC=4, DELEGATE_JOB_PYTHON=py)) + env=_env(tmp_path, SUB_STANDIN=1, SUB_RC=4, DELEGATE_JOB_PYTHON=py, WORKSPACE_ROOT=tmp_path)) assert "rc=1" in res.stdout, (res.stdout, res.stderr[-800:]) assert "ERROR: the wrapper could not decide 'wait-rc'" in res.stderr, res.stderr[-800:]