aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-10-04 23:14:37 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-10-04 23:14:37 -0700
commit985f22e42b2404420264be0b2e21f81d1efd6b52 (patch)
tree636bbcc074062bc9b6faddbfecfc570d938f98df /tools
parent9a170333d5b6aaa5eba7663cc583ca34a97ba89b (diff)
Limited number of parallel jobs for generate_projects
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildgen/generate_projects.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/buildgen/generate_projects.py b/tools/buildgen/generate_projects.py
index b2c3c26aa6..5feebf0cac 100755
--- a/tools/buildgen/generate_projects.py
+++ b/tools/buildgen/generate_projects.py
@@ -34,6 +34,7 @@ import os
import shutil
import sys
import tempfile
+import multiprocessing
sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '..', 'run_tests'))
assert sys.argv[1:], 'run generate_projects.sh instead of this directly'
@@ -73,7 +74,7 @@ for root, dirs, files in os.walk('templates'):
cmd.append(root + '/' + f)
jobs.append(jobset.JobSpec(cmd, shortname=out))
-jobset.run(jobs)
+jobset.run(jobs, maxjobs=multiprocessing.cpu_count())
if test is not None:
for s, g in test.iteritems():