diff options
Diffstat (limited to 'service/go')
-rwxr-xr-x | service/go | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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." } |