From: fennecdjay Date: Sun, 7 Jul 2019 20:05:03 +0000 (+0200) Subject: :white_check_mark: Yet more tests X-Git-Tag: nightly~2348^2~31 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=b854736c8cadce8fcd13af02f3e3028423b125b1;p=gwion.git :white_check_mark: Yet more tests --- diff --git a/tests/sh/common.sh b/tests/sh/common.sh index e6b84272..74cef102 100644 --- a/tests/sh/common.sh +++ b/tests/sh/common.sh @@ -11,8 +11,10 @@ run() { good="All heap blocks were freed -- no leaks are possible" n=$(printf "% 4i" "$1") eval valgrind ./gwion "$OPT" "$UDP" -d "$DRIVER" "$3" &> "$4" - ok=0 - grep "$good" "$4" > /dev/null && ok=1 + if [ -f "$4" ] + then grep "$good" "$4" > /dev/null && ok=1 + else ok=1 + fi if [ $ok ] then echo "ok $n $2" else echo "not ok $n $2" diff --git a/tests/sh/opt.sh b/tests/sh/opt.sh index 478a8ecf..eca7fa7c 100644 --- a/tests/sh/opt.sh +++ b/tests/sh/opt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# [test] #11 +# [test] #12 n=0 [ "$1" ] && n="$1" [ "$n" -eq 0 ] && n=1 @@ -53,4 +53,12 @@ run "$n" "plugin directory" "-p non_existant_dir" "file" # config n=$((n+1)) -run "$n" "config" "-k" "file" +cat << EOF >> tmp_gwionrc +-p. +-l0 +EOF +run "$n" "config" "-c tmp_gwionrc" "file" + +# loop +n=$((n+1)) +run "$n" "loop" "-l0" "file"