From: Ian Jackson Date: Thu, 21 Jun 2018 00:10:38 +0000 (+0100) Subject: test suite: Use nproc(1) rather than Sys::CPU. X-Git-Tag: archive/debian/5.2~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=c0df25cd65b0172d5130e01a73aa610c3b0dd105 test suite: Use nproc(1) rather than Sys::CPU. This is more portable and does not depend on libsys-cpu-perl being installed. Closes:888496. Signed-off-by: Ian Jackson --- diff --git a/debian/changelog b/debian/changelog index 2c305561..b34b4a0e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,10 @@ dgit (5.2~) unstable; urgency=medium explanation, rather than looping with a false coplaint about git fetch. Closes:#871317. + test suite: + * Use nproc(1) rather than Sys::CPU. This is more portable and does not + depend on libsys-cpu-perl being installed. Closes:888496. + -- dgit (5.1) unstable; urgency=medium diff --git a/tests/run-all b/tests/run-all index cfa5ce2f..f72b9fae 100755 --- a/tests/run-all +++ b/tests/run-all @@ -5,9 +5,8 @@ set -e set -o pipefail -set +e -jcpus=`perl -MSys::CPU -we 'printf "-j%d\n", 1.34 * Sys::CPU::cpu_count()'` -set -e +ncpus=$(nproc || echo 1) +jcpus=-j$(( ncpus * 134 / 100 )) if [ $# != 0 ]; then set TESTSCRIPTS="$*"