diff options
author | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-04 17:24:21 +0100 |
---|---|---|
committer | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-04 17:24:40 +0100 |
commit | acbc1e2f36a887136e8877bc545c4822af08adb8 (patch) | |
tree | a1208d236b8b03dce176688d8cb247cf31bb1516 /service/go | |
parent | 884fe56eba9a7ad0400226ab91ee5e9a93c6f4c9 (diff) |
make integration tests pass on Mac OS X
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." } |