From 6f9208167fcf1c27689de0f4f6a57138d267a19a Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Thu, 30 Apr 2020 11:31:11 +0000 Subject: [PATCH] Add --progress option to test-builds.sh (#618) Add an option to test-builds.sh to emit dots to enable tracking progress in the test without being fully verbose In the context of the build farm, this will save storage and bandwidth on the build nodes, while still showing issues if anything were to occur, and showing whether progress is being made or a build is stuck. --- test-builds.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/test-builds.sh b/test-builds.sh index 4254c4d639..94eeca6b01 100755 --- a/test-builds.sh +++ b/test-builds.sh @@ -33,6 +33,10 @@ while [ $# -ge 1 ]; do verbose="yes" shift ;; + --progress) + verbose="progress" + shift + ;; --keep-going) keepGoing="yes" shift @@ -64,11 +68,16 @@ while [ $# -ge 1 ]; do done logtee() { - if [ $verbose = yes ]; then - tee $1 - else - cat >$1 - fi + case $verbose in + yes) + tee $1 + ;; + progress) + tee $1 | awk '{printf "."; n++; if (!(n % 80)) print "" } END {print ""}' + ;; + *) + cat >$1 + esac } buildtest() { -- 2.47.2