]> Nishi Git Mirror - gwion.git/commitdiff
:art: Update tests
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Fri, 6 Dec 2019 15:27:28 +0000 (16:27 +0100)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Fri, 6 Dec 2019 15:27:28 +0000 (16:27 +0100)
tests/sh/common.sh

index 68b45243cbeafe74cbae0912d3033062449519f5..150c2c1af3319edcbca0627e22bd700280dffd5e 100644 (file)
@@ -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"