From b8044ce629d3d209d9c1f56fe26a1f16ebdacc84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Wed, 2 Dec 2020 15:30:48 -0300 Subject: [PATCH] common/travis/build.sh: add argument for running tests. Also use nproc(1) directly and remove FTP_RETRIES. --- common/travis/build.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/common/travis/build.sh b/common/travis/build.sh index 1c45910ea69..f5cf9cffc06 100755 --- a/common/travis/build.sh +++ b/common/travis/build.sh @@ -6,17 +6,14 @@ if [ "$1" != "$2" ]; then arch="-a $2" fi -PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates)) - -NPROCS=1 -if [ -r /proc/cpuinfo ]; then - NPROCS=$(grep ^proc /proc/cpuinfo|wc -l) +if [ "$3" = 1 ]; then + test="-Q" fi -export FTP_RETRIES=10 +PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates)) for pkg in ${PKGS}; do - /hostrepo/xbps-src -j$NPROCS -H "$HOME"/hostdir $arch pkg "$pkg" + /hostrepo/xbps-src -j$(nproc) -H "$HOME"/hostdir $arch $test pkg "$pkg" [ $? -eq 1 ] && exit 1 done