From de95bf40ee0af0e7da4cb6cc4e0ad33694234bb9 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 6 Jul 2018 10:57:55 -0400 Subject: circleci: Detect core count Test Plan: Try `./validate`, CircleCI build; make sure core count detection works in both cases. Reviewers: alpmestan Reviewed By: alpmestan Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14470 Differential Revision: https://phabricator.haskell.org/D4897 --- validate | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'validate') diff --git a/validate b/validate index 0332e5b1ec..2f82b2800b 100755 --- a/validate +++ b/validate @@ -119,29 +119,7 @@ check_packages () { fi } -detect_cpu_count () { - if [ "$CPUS" = "" ]; then - # Windows standard environment variable - CPUS="$NUMBER_OF_PROCESSORS" - fi - - if [ "$CPUS" = "" ]; then - # Linux - CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null` - fi - - if [ "$CPUS" = "" ]; then - # FreeBSD - CPUS=`getconf NPROCESSORS_ONLN 2>/dev/null` - fi - - if [ "$CPUS" = "" ]; then - # nothing helped - CPUS="1" - fi -} - -detect_cpu_count +CPUS=`mk/detect-cpu-count.sh` if ! [ -d testsuite ] then -- cgit v1.2.1