From 50ac9041ada25a7d762bc28678bc40f376a5ef79 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Tue, 21 Apr 2026 14:30:38 +0200 Subject: [PATCH] =?UTF-8?q?fix(tests):=20PR=20#134=20review=20round=203=20?= =?UTF-8?q?=E2=80=94=20seed=20start-state=20+=20PID=20log=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - test_character_creation_sprint28: before_each now seeds _selected_bookmark_id and _selected_location_id so the new disabled- guard in _on_start() (round 2) doesn't silently block 5 existing tests that call _on_start()/KEY_ENTER without setting up a valid bookmark selection. Restores the 2 tests Hoshe flagged as R2-H1 plus 3 siblings that would have degraded the same way under the guard. - tests/run-godot: LOG_FILE now includes $$ (PID) so concurrent runs across worktrees don't clobber each other's logs. Path is echoed back via the stdout JSON "log" field and the stderr hint line, so callers never need to predict it (R2-H2). --- client/tests/test_character_creation_sprint28.gd | 7 +++++++ tests/run-godot | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/client/tests/test_character_creation_sprint28.gd b/client/tests/test_character_creation_sprint28.gd index 84930111c..cabda7dd8 100644 --- a/client/tests/test_character_creation_sprint28.gd +++ b/client/tests/test_character_creation_sprint28.gd @@ -26,6 +26,13 @@ func before_each() -> void: return _scene = packed.instantiate() as CharacterCreation add_child(_scene) + # Seed a valid bookmark/location so _on_start passes the disabled guard + # added in PR #134 (R2-Hoshe-1). Tests that verify the disabled state + # should explicitly clear these and call _update_start_btn_state(). + _scene._selected_bookmark_id = "test-bookmark" + _scene._selected_location_id = "test-location" + if _scene.has_method("_update_start_btn_state"): + _scene._update_start_btn_state() func after_each() -> void: diff --git a/tests/run-godot b/tests/run-godot index e09b91b26..b6713e382 100755 --- a/tests/run-godot +++ b/tests/run-godot @@ -22,10 +22,12 @@ set -euo pipefail # extending this cap — the cap is the point. TIMEOUT_SEC=300 -# Single well-known log path. Overwritten each run. No env var — worktrees -# would each want their own value and the indirection makes the hint -# line meaningless. Multiple concurrent runs are the caller's problem. -LOG_FILE="/tmp/sr-run-godot.log" +# Per-process log path. PID suffix prevents concurrent runs across worktrees +# from clobbering each other's logs and producing summary JSON that mixes +# counts from different suites (R2-Hoshe-2). The actual path is echoed back +# via the JSON "log" field and the stderr hint line, so callers don't need +# to predict it. +LOG_FILE="/tmp/sr-run-godot.$$.log" FILTER="" while [[ $# -gt 0 ]]; do