travis: don't call tests in parallel for root

Let's make it more readable in logs for root user.

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2019-10-09 09:55:27 +02:00
parent 9e9b3d65dc
commit ac543a15b6
2 changed files with 11 additions and 3 deletions

View File

@ -64,6 +64,8 @@ function check_nonroot
$MAKE || return
osx_prepare_check
# TS_OPTS= overwrites default from tests/Makemodule.am
$MAKE check TS_OPTS="$make_opts" || return
make_checkusage || return
@ -84,9 +86,14 @@ function check_root
xconfigure $conf_opts || return
$MAKE || return
$MAKE check TS_COMMAND="true" || return
# compile tests only
$MAKE check-programs || return
# Modify environment for OSX
osx_prepare_check
sudo -E $MAKE check TS_OPTS="$make_opts" || return
# TS_OPTS= overwrites default from tests/Makemodule.am
sudo -E $MAKE check TS_PARALLEL="" TS_OPTS="$make_opts" || return
# root on osx has not enough permission for make install ;)
[ "$TRAVIS_OS_NAME" = "osx" ] && return

View File

@ -14,9 +14,10 @@ clean-local-tests:
CLEAN_LOCALS += clean-local-tests
TS_OPTS = --nonroot
TS_PARALLEL = --parallel
TS_COMMAND = $(top_srcdir)/tests/run.sh \
--srcdir=$(abs_top_srcdir) --builddir=$(abs_top_builddir) \
--parallel $(TS_OPTS)
$(TS_PARALLEL) $(TS_OPTS)
check-local-tests: $(check_PROGRAMS)
$(AM_V_GEN) $(TS_COMMAND)