mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
common/travis/build.sh: add argument for running tests.
Also use nproc(1) directly and remove FTP_RETRIES.
This commit is contained in:
parent
8dfcf8b7a0
commit
b8044ce629
1 changed files with 4 additions and 7 deletions
|
@ -6,17 +6,14 @@ if [ "$1" != "$2" ]; then
|
||||||
arch="-a $2"
|
arch="-a $2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
|
if [ "$3" = 1 ]; then
|
||||||
|
test="-Q"
|
||||||
NPROCS=1
|
|
||||||
if [ -r /proc/cpuinfo ]; then
|
|
||||||
NPROCS=$(grep ^proc /proc/cpuinfo|wc -l)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export FTP_RETRIES=10
|
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
|
||||||
|
|
||||||
for pkg in ${PKGS}; do
|
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
|
[ $? -eq 1 ] && exit 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue