From 171a2544256ac409c5bf48f5cda4dba176238f51 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sat, 20 Jun 2020 19:03:10 +0300 Subject: [PATCH] mdbx-test: use banner tool only when available. Change-Id: I4b9bffffc69e664fbca8346312934534ad7579e7 --- test/long_stochastic.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/long_stochastic.sh b/test/long_stochastic.sh index 7141ee62..45d1247a 100755 --- a/test/long_stochastic.sh +++ b/test/long_stochastic.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash -if ! which make cc c++ tee lz4 banner >/dev/null; then +if ! which make cc c++ tee lz4 >/dev/null; then echo "Please install the following prerequisites: make cc c++ tee lz4 banner" >&2 exit 1 fi -set -euo pipefail - +BANNER="$(which banner 2>/dev/null | echo echo)" UNAME="$(uname -s 2>/dev/null || echo Unknown)" +set -euo pipefail ## NOTE: Valgrind could produce some false-positive warnings ## in multi-process environment with shared memory. @@ -193,7 +193,7 @@ for nops in 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000; do speculum=$([ $nops -le 1000 ] && echo '--speculum' || true) while true; do echo "=======================================================================" - banner "$nops / $wbatch" + ${BANNER} "$nops / $wbatch" subcase=0 for ((bits=2**${#options[@]}; --bits >= 0; )); do seed=$(($(date +%s) + RANDOM))