From: Francesco Chemolli Date: Thu, 30 Apr 2020 11:31:11 +0000 (+0000) Subject: Add --progress option to test-builds.sh (#618) X-Git-Tag: 4.15-20210522-snapshot~127 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=6f9208167fcf1c27689de0f4f6a57138d267a19a;p=thirdparty%2Fsquid.git 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. --- 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() {