Cosmetics in test scripts

Some versions of "which" print on stderr.
This commit is contained in:
Manuel Pégourié-Gonnard 2015-06-26 15:45:30 +02:00
parent 4fd0b256a8
commit 03db6b0da1
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ SRVMEM=0
: ${GNUTLS_SERV:=gnutls-serv} : ${GNUTLS_SERV:=gnutls-serv}
# do we have a recent enough GnuTLS? # do we have a recent enough GnuTLS?
if ( which $GNUTLS_CLI && which $GNUTLS_SERV ) >/dev/null; then if ( which $GNUTLS_CLI && which $GNUTLS_SERV ) >/dev/null 2>&1; then
G_VER="$( $GNUTLS_CLI --version | head -n1 )" G_VER="$( $GNUTLS_CLI --version | head -n1 )"
if echo "$G_VER" | grep '@VERSION@' > /dev/null; then # git version if echo "$G_VER" | grep '@VERSION@' > /dev/null; then # git version
PEER_GNUTLS=" GnuTLS" PEER_GNUTLS=" GnuTLS"

View File

@ -107,7 +107,7 @@ requires_openssl_with_fallback_scsv() {
# skip next test if GnuTLS isn't available # skip next test if GnuTLS isn't available
requires_gnutls() { requires_gnutls() {
if [ -z "${GNUTLS_AVAILABLE:-}" ]; then if [ -z "${GNUTLS_AVAILABLE:-}" ]; then
if ( which "$GNUTLS_CLI" && which "$GNUTLS_SERV" ) >/dev/null; then if ( which "$GNUTLS_CLI" && which "$GNUTLS_SERV" ) >/dev/null 2>&1; then
GNUTLS_AVAILABLE="YES" GNUTLS_AVAILABLE="YES"
else else
GNUTLS_AVAILABLE="NO" GNUTLS_AVAILABLE="NO"
@ -229,7 +229,7 @@ has_mem_err() {
# wait for server to start: two versions depending on lsof availability # wait for server to start: two versions depending on lsof availability
wait_server_start() { wait_server_start() {
if which lsof >/dev/null; then if which lsof >/dev/null 2>&1; then
# make sure we don't loop forever # make sure we don't loop forever
( sleep "$DOG_DELAY"; echo "SERVERSTART TIMEOUT"; kill $MAIN_PID ) & ( sleep "$DOG_DELAY"; echo "SERVERSTART TIMEOUT"; kill $MAIN_PID ) &
DOG_PID=$! DOG_PID=$!