summaryrefslogtreecommitdiff
path: root/service/go
diff options
context:
space:
mode:
Diffstat (limited to 'service/go')
-rwxr-xr-xservice/go14
1 files changed, 13 insertions, 1 deletions
diff --git a/service/go b/service/go
index ec6a65f6..d23adf4f 100755
--- a/service/go
+++ b/service/go
@@ -1,5 +1,15 @@
#!/bin/bash
+NUM_OF_CORES=''
+
+function resolveNumOfCores {
+ if [ "$(uname)" == "Darwin" ]; then
+ NUM_OF_CORES="$(sysctl -n hw.ncpu)"
+ else
+ NUM_OF_CORES="$(nproc)"
+ fi
+}
+
function setuppy {
pip install -r test_requirements.txt
python setup.py develop $*
@@ -14,7 +24,9 @@ function setupjs {
}
function runIntegrationTests {
- trial --reporter=text $* test.integration
+ resolveNumOfCores
+ echo $NUM_OF_CORES
+ trial -j $NUM_OF_CORES --reporter=text $* test.integration
}
function runUnitTests {