xbps/run-tests
Juan RP 3cf3dafc20 run-tests: enable kyua parallelism by default.
Use number of processors as reported by /proc/cpuinfo,
otherwise just set it to 1 (default).

This makes running the test suite in less than 16s on my
i5 ivybridge CPU.
2019-04-22 14:51:13 +02:00

18 lines
369 B
Bash
Executable File

#!/bin/sh
for f in bin/*; do
export PATH=$PWD/$f:$PATH
done
export PATH=$PATH:/usr/local/bin
export LD_PRELOAD=$PWD/lib/libxbps.so
NPROCS=1
if [ -r /proc/cpuinfo ]; then
NPROCS=$(cat /proc/cpuinfo|grep processor|wc -l)
fi
kyua --variable parallelism=$NPROCS test -r result.db -k tests/xbps/Kyuafile
rv=$?
kyua report --verbose -r result.db
rm -f result.db
exit $rv