diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-03-23 15:16:40 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-03-23 15:16:40 +0000 |
| commit | 5ad95b335fd1165ee7a49c29430b37b0456ee385 (patch) | |
| tree | 99d386b9efb0653c60db429cd37038c66a92da3e | |
| parent | 1dcbef80620249893d23bf3ff432778fd9ff9070 (diff) | |
| parent | 4f84f3d15c999611aa56151fe9f572aec05c10bd (diff) | |
| download | kolla-5ad95b335fd1165ee7a49c29430b37b0456ee385.tar.gz kolla-5ad95b335fd1165ee7a49c29430b37b0456ee385.zip | |
Merge "Speed up builds by increasing threads for builds"
| -rw-r--r-- | tests/test_build.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_build.py b/tests/test_build.py index 0a70018a1..6eb783f59 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -11,6 +11,7 @@ # under the License. import abc +import multiprocessing import os import sys @@ -34,7 +35,12 @@ class BuildTest(object): super(BuildTest, self).setUp() self.useFixture(log_fixture.SetLogLevel([__name__], logging.logging.INFO)) - self.build_args = [__name__, "--debug", '--threads', '4'] + + self.threads = multiprocessing.cpu_count() + if self.threads < 4: + self.threads = 4 + + self.build_args = [__name__, "--debug", '--threads', str(self.threads)] @testtools.skipUnless(os.environ.get('DOCKER_BUILD_TEST'), 'Skip the docker build test') |
