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.10.0~16 X-Git-Url: https://git.lttng.org/?p=urcu.git;a=commitdiff_plain;h=e9bea64ae432ec3cdd6d2ccbd691190a35256d97 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}"