on master help sign in
Make building bench-report respect --silent
commit7b0a34348e7b8582c433e0642544ec8cee292c5e authorAdithya Kumar <adithya@composewell.com> dateWed 2 Feb 2022, 06:05 (5 years ago) parent29c0e51
2 files changed+10−2
benchmark/bench-report/bin/bench-runner.sh+5−2 benchmark/bench-report/bin/build-lib.sh+5
benchmark/bench-report/bin/bench-runner.sh+5−2
@@ -119,7 +119,7 @@ build_report_progs() {
119119 local prog
120120 prog=$BENCH_REPORT_DIR/bin/bench-report
121121 test -x $prog || die "Cannot find bench-report executable"
122− test -z "$SILENT" && echo "Using bench-report executable [$prog]"
122+ echo "Using bench-report executable [$prog]"
123123 fi
124124}
125125
@@ -615,7 +615,10 @@ test -z "$SILENT" && echo "Using benchmark suites [$TARGETS]"
615615
616616# We need to build the report progs first at the current (latest) commit before
617617# checking out any other commit for benchmarking.
618−build_report_progs
618+if test -z "$SILENT"
619+then build_report_progs
620+else silently build_report_progs
621+fi
619622
620623#-----------------------------------------------------------------------------
621624# Build and run targets
benchmark/bench-report/bin/build-lib.sh+5
@@ -25,6 +25,11 @@ has_item () {
2525 done
2626}
2727
28+# $1: command
29+silently () {
30+ eval "$1 &> /dev/null"
31+}
32+
2833#------------------------------------------------------------------------------
2934# target groups
3035#------------------------------------------------------------------------------