diff options
author | Érico Rolim <erico.erc@gmail.com> | 2020-12-02 18:30:48 +0000 |
---|---|---|
committer | Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com> | 2020-12-14 03:18:04 +0000 |
commit | b8044ce629d3d209d9c1f56fe26a1f16ebdacc84 (patch) | |
tree | 6a15162439b7bac4be7ef88ea3a61f10a022de08 /common/travis | |
parent | 8dfcf8b7a0f3dad8bc822bb11ad6f5021d55cfcf (diff) | |
download | void-packages-b8044ce629d3d209d9c1f56fe26a1f16ebdacc84.tar void-packages-b8044ce629d3d209d9c1f56fe26a1f16ebdacc84.tar.gz void-packages-b8044ce629d3d209d9c1f56fe26a1f16ebdacc84.tar.bz2 void-packages-b8044ce629d3d209d9c1f56fe26a1f16ebdacc84.tar.lz void-packages-b8044ce629d3d209d9c1f56fe26a1f16ebdacc84.tar.xz void-packages-b8044ce629d3d209d9c1f56fe26a1f16ebdacc84.tar.zst void-packages-b8044ce629d3d209d9c1f56fe26a1f16ebdacc84.zip |
common/travis/build.sh: add argument for running tests.
Also use nproc(1) directly and remove FTP_RETRIES.
Diffstat (limited to 'common/travis')
-rwxr-xr-x | common/travis/build.sh | 11 |
1 files 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 |