From 571f5f5ba1eadc9fec48936f90cd23399a0638f7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 9 Oct 2019 12:01:57 +0200 Subject: [PATCH] build-sys: support 'none' for parallel tests Signed-off-by: Karel Zak --- .travis-functions.sh | 2 +- tests/run.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis-functions.sh b/.travis-functions.sh index a608e3ac8..4cd145668 100755 --- a/.travis-functions.sh +++ b/.travis-functions.sh @@ -93,7 +93,7 @@ function check_root osx_prepare_check # TS_OPTS= overwrites default from tests/Makemodule.am - sudo -E $MAKE check TS_PARALLEL=' ' TS_OPTS="$make_opts" || return + sudo -E $MAKE check "TS_PARALLEL=--parallel=none" TS_OPTS="$make_opts" || return # root on osx has not enough permission for make install ;) [ "$TRAVIS_OS_NAME" = "osx" ] && return diff --git a/tests/run.sh b/tests/run.sh index dfbb10243..1c3efdb6e 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -93,7 +93,9 @@ while [ -n "$1" ]; do ;; --parallel=*) paraller_jobs="${1##--parallel=}" - if ! [ "$paraller_jobs" -ge 0 ] 2>/dev/null; then + if [ "$paraller_jobs" = "none" ]; then + paraller_jobs=1 + elif ! [ "$paraller_jobs" -ge 0 ] 2>/dev/null; then echo "invalid argument '$paraller_jobs' for --parallel=" exit 1 fi @@ -121,7 +123,7 @@ while [ -n "$1" ]; do echo " --noskip-commands fail on missing commands" echo " --srcdir= autotools top source directory" echo " --builddir= autotools top build directory" - echo " --parallel= number of parallel test jobs, default: num cpus" + echo " --parallel= number of parallel test jobs, default: num cpus" echo " --exclude= exclude tests by list '/ ..'" echo exit 1