From b65dfa56cc7f3082ecb9983431b20e3ce7cffe36 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 6 Dec 2019 16:27:28 +0100 Subject: [PATCH] :art: Update tests --- tests/sh/common.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/sh/common.sh b/tests/sh/common.sh index 68b45243..150c2c1a 100644 --- a/tests/sh/common.sh +++ b/tests/sh/common.sh @@ -9,10 +9,14 @@ run() { local good n ok good="All heap blocks were freed -- no leaks are possible" n=$(printf "% 4i" "$1") - eval valgrind ./gwion "$GWOPT" -d "$DRIVER" "$3" &> "$4" - if [ -f "$4" ] - then grep "$good" "$4" > /dev/null && ok=1 - else ok=1 + if [ "$VALGRIND" == "NO_VALGRIND" ] + then ./gwion "$GWOPT" -d "$DRIVER" "$3" &> "$4" && ok=1 + else + eval valgrind ./gwion "$GWOPT" -d "$DRIVER" "$3" &> "$4" + if [ -f "$4" ] + then grep "$good" "$4" > /dev/null && ok=1 + else ok=1 + fi fi if [ $ok ] then echo "ok $n $2" -- 2.43.0