summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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."
}