diff --git a/game/tests/run_all.gd b/game/tests/run_all.gd index 49302252..308c0e0b 100644 --- a/game/tests/run_all.gd +++ b/game/tests/run_all.gd @@ -149,6 +149,10 @@ func _init() -> void: return if failures > 0: push_error("[run_all] %d 个套件失败" % failures) + for fp in failed_paths: + push_error("[run_all] 失败套件: %s" % fp) + for tp in timed_out_paths: + push_error("[run_all] 超时套件: %s" % tp) quit(1) return var tag := ",filtered" if filtered else "" diff --git a/tools/run_all_gates.sh b/tools/run_all_gates.sh index 6e867e36..d2af73fc 100755 --- a/tools/run_all_gates.sh +++ b/tools/run_all_gates.sh @@ -322,9 +322,10 @@ gate() { # gate <名称> <日志名> <命令...> echo "════════════════════════════════════════════" "$@" >"$STAMP_DIR/$log" 2>&1 local rc=$? - # 失败时把关键行回显到终端(红必须看得见) + # 失败时把关键行回显到终端(红必须看得见——明细行形态 [Rx]/[Sxx]/违规/存量 同回显, + # 远端 runner 只回传终端日志,折叠过窄=红因滞留 runner 侧不可诊断) if [ $rc -ne 0 ]; then - grep -E "FAIL|红|Error|error" "$STAMP_DIR/$log" | tail -12 | sed 's/^/ | /' + grep -E "FAIL|红|Error|error|违规|存量|^\[|\] FAIL" "$STAMP_DIR/$log" | tail -60 | sed 's/^/ | /' fi NAMES+=("$name"); EXITS+=("$rc"); LOGS+=("$log") return 0 @@ -388,7 +389,9 @@ gate_unit() { # run_all 是 --script 模式,退出码为唯一判据;分 rc=1 tail -12 "$STAMP_DIR/unit.log" | sed 's/^/ | /' fi - [ $rc -ne 0 ] && tail -12 "$STAMP_DIR/unit.log" | sed 's/^/ | /' + if [ $rc -ne 0 ]; then + grep -E "FAIL res://|超时|ABORT|个套件失败|套件未跑|SCRIPT ERROR|Parse Error" "$STAMP_DIR/unit.log" | tail -80 | sed 's/^/ | /' + fi NAMES+=("$name"); EXITS+=("$rc"); LOGS+=("unit.log") return 0 }