diff options
author | Jarret Shook <jashoo@microsoft.com> | 2017-09-13 01:43:06 -0700 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-09-13 10:43:06 +0200 |
commit | 80dd47bb5564f1cfc843c8d753096a0a3acfbe2d (patch) | |
tree | de2a4f1d75705b7bf2173e2158f8131af5a5aae8 | |
parent | 5eac91c7101aeb02abe390935c35342432570323 (diff) | |
download | coreclr-80dd47bb5564f1cfc843c8d753096a0a3acfbe2d.tar.gz coreclr-80dd47bb5564f1cfc843c8d753096a0a3acfbe2d.tar.bz2 coreclr-80dd47bb5564f1cfc843c8d753096a0a3acfbe2d.zip |
Change how numProc is derived on Linux (#13909)
Before the decision for numProcs to run in parallel for runtests.sh
was based on _NPROCESSORS_ONLN which harware which attempts to save
power (eg arm(64)) this number may be < numProcs.
-rwxr-xr-x | build.sh | 4 | ||||
-rwxr-xr-x | tests/runtest.sh | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -643,8 +643,10 @@ if [ `uname` = "FreeBSD" ]; then __NumProc=`sysctl hw.ncpu | awk '{ print $2+1 }'` elif [ `uname` = "NetBSD" ]; then __NumProc=$(($(getconf NPROCESSORS_ONLN)+1)) -else +elif [ `uname` = "Darwin" ]; then __NumProc=$(($(getconf _NPROCESSORS_ONLN)+1)) +else + __NumProc=$(nproc --all) fi while :; do diff --git a/tests/runtest.sh b/tests/runtest.sh index fdc067eb2d..e238723743 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -733,8 +733,10 @@ function run_test { # Variables for running tests in the background if [ `uname` = "NetBSD" ]; then NumProc=$(getconf NPROCESSORS_ONLN) -else +elif [ `uname` = "Darwin" ]; then NumProc=$(getconf _NPROCESSORS_ONLN) +else + NumProc=$(nproc --all) fi ((maxProcesses = $NumProc * 3 / 2)) # long tests delay process creation, use a few more processors |