From: Michael Jeanson Date: Thu, 1 Dec 2016 16:56:08 +0000 (-0500) Subject: Tests: Add verbose support to test script X-Git-Tag: v0.9.4~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=df0de5e1f256e7b8a324e52e4bcc45f5351e0ef0;p=userspace-rcu.git Tests: Add verbose support to test script Add support for the standard "V=1" to make the test runner script verbose. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/benchmark/run.sh b/tests/benchmark/run.sh index d99a493..1ec7e5e 100755 --- a/tests/benchmark/run.sh +++ b/tests/benchmark/run.sh @@ -1,6 +1,7 @@ #!/bin/bash # # Copyright (C) 2013 - Christian Babeux +# 2016 - Michael Jeanson # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -18,8 +19,16 @@ # INPUT=$1 +ARGS=() shift 1 -[ -z "${INPUT}" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 +if [ -z "${INPUT}" ]; then + echo "Error: No testlist. Please specify a testlist to run." + exit 1 +fi -prove ${*} --merge --exec '' - < ${INPUT} +if [ "x$V" == "x1" ]; then + ARGS+=('-v') +fi + +prove "${@}" "${ARGS[@]}" --merge --exec '' - < "${INPUT}" diff --git a/tests/regression/run.sh b/tests/regression/run.sh index d99a493..1ec7e5e 100755 --- a/tests/regression/run.sh +++ b/tests/regression/run.sh @@ -1,6 +1,7 @@ #!/bin/bash # # Copyright (C) 2013 - Christian Babeux +# 2016 - Michael Jeanson # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -18,8 +19,16 @@ # INPUT=$1 +ARGS=() shift 1 -[ -z "${INPUT}" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 +if [ -z "${INPUT}" ]; then + echo "Error: No testlist. Please specify a testlist to run." + exit 1 +fi -prove ${*} --merge --exec '' - < ${INPUT} +if [ "x$V" == "x1" ]; then + ARGS+=('-v') +fi + +prove "${@}" "${ARGS[@]}" --merge --exec '' - < "${INPUT}" diff --git a/tests/unit/run.sh b/tests/unit/run.sh index d99a493..1ec7e5e 100755 --- a/tests/unit/run.sh +++ b/tests/unit/run.sh @@ -1,6 +1,7 @@ #!/bin/bash # # Copyright (C) 2013 - Christian Babeux +# 2016 - Michael Jeanson # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -18,8 +19,16 @@ # INPUT=$1 +ARGS=() shift 1 -[ -z "${INPUT}" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 +if [ -z "${INPUT}" ]; then + echo "Error: No testlist. Please specify a testlist to run." + exit 1 +fi -prove ${*} --merge --exec '' - < ${INPUT} +if [ "x$V" == "x1" ]; then + ARGS+=('-v') +fi + +prove "${@}" "${ARGS[@]}" --merge --exec '' - < "${INPUT}"