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.
This commit is contained in:
Juan RP 2019-04-20 21:46:28 +02:00 committed by Duncaen
parent 6fe9a05d93
commit 3cf3dafc20

View File

@ -6,7 +6,11 @@ done
export PATH=$PATH:/usr/local/bin export PATH=$PATH:/usr/local/bin
export LD_PRELOAD=$PWD/lib/libxbps.so export LD_PRELOAD=$PWD/lib/libxbps.so
kyua test -r result.db -k tests/xbps/Kyuafile 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=$? rv=$?
kyua report --verbose -r result.db kyua report --verbose -r result.db
rm -f result.db rm -f result.db