release 1.13.9: suppress mid-run SUMMARY and progress standings
Multi-phase runs no longer print intermediate progress bars, numbered checks, or SUMMARY boxes after each phase (e.g. 34/52 after urls). Only the last phase (or a solo check_*.sh) may full-summary; global progress_finish still ends the run.
This commit is contained in:
parent
c0d0b62a94
commit
80638ddea0
4 changed files with 48 additions and 24 deletions
56
lib.sh
56
lib.sh
|
|
@ -862,29 +862,36 @@ section() {
|
|||
|
||||
summary() {
|
||||
local blk_n=${#BLOCKERS[@]}
|
||||
echo ""
|
||||
# Phase progress snapshot — keep GLOBAL total (do not snap N to phase-local done).
|
||||
# Snapping here made mid-run bars like 34/34 then 38/47. Whole-run snap: progress_finish.
|
||||
if [ "${PROGRESS_OFF:-0}" != "1" ] && [ "${PROGRESS_DONE:-0}" -gt 0 ]; then
|
||||
if [ "${PROGRESS_FINAL:-0}" = "1" ]; then
|
||||
# last phase / explicit final: done/total exact
|
||||
if [ "$PROGRESS_TOTAL" -gt 0 ] && [ "$PROGRESS_DONE" -ne "$PROGRESS_TOTAL" ]; then
|
||||
PROGRESS_TOTAL=$PROGRESS_DONE
|
||||
_mon_state_save
|
||||
fi
|
||||
fi
|
||||
_progress_rebalance
|
||||
_progress_bar_line "$PROGRESS_DONE" "$PROGRESS_TOTAL"
|
||||
# Multi-phase runs: no intermediate progress bar / numbered checks / SUMMARY box
|
||||
# (v1.13.9+). Solo check_*.sh still full summary. Parent sets TALER_MON_MULTI_PHASE=1
|
||||
# and only the last phase gets PROGRESS_FINAL=1. Mid-run still lists ERRORS/BLOCKERS.
|
||||
local _full=1
|
||||
if [ "${TALER_MON_MULTI_PHASE:-0}" = "1" ] && [ "${PROGRESS_FINAL:-0}" != "1" ]; then
|
||||
_full=0
|
||||
fi
|
||||
if [ "$GLOBAL_N" -gt 0 ]; then
|
||||
# Always show global position: current # / expected total (if known)
|
||||
if [ "${PROGRESS_TOTAL:-0}" -gt 0 ]; then
|
||||
printf -- '%s %s #001…#%03d · %d/%d %s%s\n' \
|
||||
"$D" "$(i18n_text 'numbered checks:')" "$GLOBAL_N" \
|
||||
"$PROGRESS_DONE" "$PROGRESS_TOTAL" \
|
||||
"$(i18n_text '(global done/total)')" "$N"
|
||||
else
|
||||
printf -- '%s %s #001…#%03d%s\n' "$D" "$(i18n_text 'numbered checks this run:')" "$GLOBAL_N" "$N"
|
||||
|
||||
echo ""
|
||||
if [ "$_full" = "1" ]; then
|
||||
# Progress snapshot — whole-run snap also in progress_finish.
|
||||
if [ "${PROGRESS_OFF:-0}" != "1" ] && [ "${PROGRESS_DONE:-0}" -gt 0 ]; then
|
||||
if [ "${PROGRESS_FINAL:-0}" = "1" ]; then
|
||||
if [ "${PROGRESS_TOTAL:-0}" -gt 0 ] && [ "$PROGRESS_DONE" -ne "$PROGRESS_TOTAL" ]; then
|
||||
PROGRESS_TOTAL=$PROGRESS_DONE
|
||||
_mon_state_save
|
||||
fi
|
||||
fi
|
||||
_progress_rebalance
|
||||
_progress_bar_line "$PROGRESS_DONE" "$PROGRESS_TOTAL"
|
||||
fi
|
||||
if [ "$GLOBAL_N" -gt 0 ]; then
|
||||
if [ "${PROGRESS_TOTAL:-0}" -gt 0 ]; then
|
||||
printf -- '%s %s #001…#%03d · %d/%d %s%s\n' \
|
||||
"$D" "$(i18n_text 'numbered checks:')" "$GLOBAL_N" \
|
||||
"$PROGRESS_DONE" "$PROGRESS_TOTAL" \
|
||||
"$(i18n_text '(global done/total)')" "$N"
|
||||
else
|
||||
printf -- '%s %s #001…#%03d%s\n' "$D" "$(i18n_text 'numbered checks this run:')" "$GLOBAL_N" "$N"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$blk_n" -gt 0 ]; then
|
||||
|
|
@ -911,7 +918,10 @@ summary() {
|
|||
done
|
||||
fi
|
||||
|
||||
# Coloured totals — same severity badges as check lines (always; NO_COLOR blanks ANSI)
|
||||
# Coloured totals — only at full/final summary (not mid multi-phase)
|
||||
if [ "$_full" != "1" ]; then
|
||||
return 0
|
||||
fi
|
||||
if [ "${BOX:-0}" = "1" ]; then
|
||||
printf -- '\n%s┌ %s ┐%s\n' "$BG_SEC" "$(i18n_tag SUMMARY)" "$N"
|
||||
_sum_badge() { # $1=bg $2=tag $3=fg $4=n
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue