diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2015-02-03 12:36:10 -0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2015-02-03 12:36:18 -0200 |
commit | b2692d94b3968ca82720841a61d4d31e7e253da9 (patch) | |
tree | d2b209c5e8827be27339bd6ca472444c96805c60 /service/go | |
parent | e4c47334a5b986397e93a88badc263648d7d2ae0 (diff) |
Auto-detecting the number of cores to run integration tests in parallel
Diffstat (limited to 'service/go')
-rwxr-xr-x | service/go | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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 { |