From 61e927785a8b79141cb5aac622cb00b547b78b9b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 15 Sep 2015 09:56:57 +0200 Subject: tests: add a -j $jobs mode to test runner for parallel execution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that tests can be run in parallel, lets actually do it… The mode has some downsides like not collecting the failed tests, but it can be a lot faster than a sequential run and is therefore a good alternative in testing those "this shouldn't break anything" changes (which tend to break everything if untested). Git-Dch: Ignore --- test/integration/framework | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test/integration/framework') diff --git a/test/integration/framework b/test/integration/framework index 2fb924802..6e3977eee 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -9,6 +9,14 @@ while [ -n "$1" ]; do export MSGLEVEL=4 elif [ "$1" = '--color=no' ]; then export MSGCOLOR='NO' + elif [ "$1" = '--color=yes' ]; then + export MSGCOLOR='YES' + elif [ "$1" = '--color' ]; then + export MSGCOLOR="$(echo "$2" | tr 'a-z' 'A-Z')" + shift + elif [ "$1" = '--level' ]; then + export MSGLEVEL=$2 + shift else echo >&2 "WARNING: Unknown parameter »$1« will be ignored" fi @@ -17,7 +25,7 @@ done export MSGLEVEL="${MSGLEVEL:-3}" # we all like colorful messages -if [ "$MSGCOLOR" != 'NO' ] && [ "$MSGCOLOR" != 'ALWAYS' ]; then +if [ "${MSGCOLOR:-YES}" = 'YES' ]; then if [ ! -t 1 ]; then # but check that we output to a terminal export MSGCOLOR='NO' fi -- cgit v1.2.3