合并(CI可观测性·fix-ci-obs): 红态诊断三件——gate()回显加宽/gate_unit关键行grep/run_all失败超时清单打印; 动机=run14的17套件崩死清单与远端静态扫描明细滞留runner,下一轮CI回执即可读取定位
ci / gates (push) Failing after 3m37s
ci / gates (push) Failing after 3m37s
This commit is contained in:
commit
8c53948737
2 files changed
+10
-3
No files matched your search
@@ -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 ""
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user