summaryrefslogtreecommitdiff
path: root/service/go
diff options
context:
space:
mode:
authorRoald de Vries <rdevries@thoughtworks.com>2016-11-04 17:24:21 +0100
committerRoald de Vries <rdevries@thoughtworks.com>2016-11-04 17:24:40 +0100
commitacbc1e2f36a887136e8877bc545c4822af08adb8 (patch)
treea1208d236b8b03dce176688d8cb247cf31bb1516 /service/go
parent884fe56eba9a7ad0400226ab91ee5e9a93c6f4c9 (diff)
make integration tests pass on Mac OS X
Diffstat (limited to 'service/go')
-rwxr-xr-xservice/go15
1 files changed, 13 insertions, 2 deletions
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."
}