@@ -25,6 +25,12 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
2525GAME=" $ROOT /test_game"
2626TEMPLATES=" $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
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.
127133LOG=" $( 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
129135cat " $LOG "
130136
131137if grep -q " Status: PASSED" " $LOG " ; then
0 commit comments