Skip to content

Commit aa28c75

Browse files
committed
increase test case timeout
1 parent 5e0a4a2 commit aa28c75

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

bin/test_harness.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
2525
GAME="$ROOT/test_game"
2626
TEMPLATES="$GAME/templates"
2727

28+
# A testcase that never yields (an interaction whose rebuild never completes)
29+
# leaves the rpytest executor silent, so no test-level timeout fires and the
30+
# engine hangs the whole CI job. Bound the engine process; when it fires, the
31+
# normal failure path below dumps the partial log. Generous vs real runs.
32+
CUE_ENGINE_TIMEOUT="${CUE_ENGINE_TIMEOUT:-600}"
33+
2834
# --- Resolve the launcher's game root and the bundled Ren'Py major version. ---
2935
# 7.x games carry a literal `version_tuple = (7, ...)` in renpy/__init__.py;
3036
# 8.x builds it dynamically (VersionTuple(...)) and never has that literal.
@@ -110,7 +116,7 @@ if [ "$DSL" = "legacy" ]; then
110116
for name in $NAMES; do
111117
echo "[cue] running testcase: $name"
112118
rm -f "$MOD/debug.log"
113-
if ! $RUN_PREFIX "$LAUNCHER" --savedir "$SAVEDIR" "$GAME" test "$name"; then
119+
if ! timeout "$CUE_ENGINE_TIMEOUT" $RUN_PREFIX "$LAUNCHER" --savedir "$SAVEDIR" "$GAME" test "$name"; then
114120
echo "[cue] testcase FAILED: $name" >&2
115121
if [ -f "$MOD/debug.log" ]; then
116122
echo "[cue] renpy_cue/debug.log:" >&2
@@ -125,7 +131,7 @@ fi
125131
# 8.x: one suite run. The test `exit` statement raises QuitException so the
126132
# process exits 0 regardless of pass/fail -- parse the reporter summary.
127133
LOG="$(mktemp -t cue_testcases.XXXXXX.log)"
128-
$RUN_PREFIX "$LAUNCHER" --savedir "$SAVEDIR" "$GAME" test "$@" > "$LOG" 2>&1 || true
134+
timeout "$CUE_ENGINE_TIMEOUT" $RUN_PREFIX "$LAUNCHER" --savedir "$SAVEDIR" "$GAME" test "$@" > "$LOG" 2>&1 || true
129135
cat "$LOG"
130136

131137
if grep -q "Status: PASSED" "$LOG"; then

test_game/templates/testcases_modern.rpy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ init 1000 python:
3232

3333
testsuite global:
3434
before testcase:
35-
$ _test.timeout = 2.0
35+
# Generous: a cold/loaded CI runner can take >2s to settle the SFX
36+
# page rebuild after a restart_interaction (sfx_target_context timed
37+
# out at the old 2.0 on 8.5.3/ubuntu-24.04). Slow-but-finite renders
38+
# time out; only a truly never-yielding render still hangs (bounded
39+
# by CUE_ENGINE_TIMEOUT in the harness).
40+
$ _test.timeout = 10.0
3641
$ _test.transition_timeout = 0.05
3742
$ _cue.is_overlay_visible = True
3843

0 commit comments

Comments
 (0)