fix(tests): PR #134 review round 3 — seed start-state + PID log path

- 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).
This commit is contained in:
2026-04-21 14:30:38 +02:00
parent 53fbce08fb
commit 50ac9041ad
2 changed files with 13 additions and 4 deletions
@@ -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:
+6 -4
View File
@@ -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