mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-01-02 13:23:13 +00:00
scripts: broaden nonzero progress heuristic
This commit is contained in:
parent
347d72950d
commit
4f202295ba
@ -112,12 +112,26 @@ matrix::forwarded_args() {
|
||||
|
||||
matrix::log_has_nonzero_progress() {
|
||||
local log="$1"
|
||||
# Heuristic: "some progress happened" means we observed some non-zero metric
|
||||
# from the runner/expectations. Keep this intentionally lax; it's a local
|
||||
# iteration escape hatch, not a CI signal.
|
||||
#
|
||||
# Use portable awk (no 3-arg match()) so this works on macOS / busybox.
|
||||
awk '
|
||||
match($0, /height[^0-9]*[0-9]+/) {
|
||||
s = substr($0, RSTART, RLENGTH)
|
||||
gsub(/[^0-9]/, "", s)
|
||||
if (s + 0 > 0) { ok = 1 }
|
||||
function record_num(re) {
|
||||
if (match($0, re)) {
|
||||
s = substr($0, RSTART, RLENGTH)
|
||||
gsub(/[^0-9]/, "", s)
|
||||
if (s + 0 > 0) { ok = 1 }
|
||||
}
|
||||
}
|
||||
{
|
||||
record_num(/height[^0-9]*[0-9]+/)
|
||||
record_num(/observed_blocks[^0-9]*[0-9]+/)
|
||||
record_num(/observed_total_blobs[^0-9]*[0-9]+/)
|
||||
record_num(/channels_with_blobs[^0-9]*[0-9]+/)
|
||||
record_num(/inscriptions_observed[^0-9]*[0-9]+/)
|
||||
record_num(/observed[^0-9]*[0-9]+\/[0-9]+/)
|
||||
}
|
||||
END { exit ok ? 0 : 1 }
|
||||
' "${log}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user