From acbc1e2f36a887136e8877bc545c4822af08adb8 Mon Sep 17 00:00:00 2001 From: Roald de Vries Date: Fri, 4 Nov 2016 17:24:21 +0100 Subject: make integration tests pass on Mac OS X --- service/go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'service/go') diff --git a/service/go b/service/go index b27025c4..0a2297f8 100755 --- a/service/go +++ b/service/go @@ -1,6 +1,7 @@ #!/bin/bash NUM_OF_CORES='' +NUM_OF_JOBS='' TRIAL_PATH='' function getTrialAbsolutePath { @@ -15,6 +16,16 @@ function resolveNumOfCores { fi } +function resolveNumOfJobs { + resolveNumOfCores + if [ "$(uname)" == "Darwin" ]; then + # Somehow, the tests fail on MacOS X for NUM_OF_JOBS="$NUM_OF_CORES" + NUM_OF_JOBS="$(($NUM_OF_CORES > 1 ? $NUM_OF_CORES / 2 : 1))" + else + NUM_OF_JOBS="$NUM_OF_CORES" + fi +} + function removeZmqCertificates { if [ -d ~/.config/leap/events/zmq_certificates ] ; then echo "Removing zmq folder before running tests." @@ -46,8 +57,8 @@ function setupjs { function runIntegrationTests { echo "Executing Integration Tests." - resolveNumOfCores - trial -j $NUM_OF_CORES --reporter=text $* test.integration + resolveNumOfJobs + trial -j $NUM_OF_JOBS --reporter=text $* test.integration echo "Done." } -- cgit v1.2.3