diff options
author | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-10-05 13:59:03 -0700 |
---|---|---|
committer | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-10-05 13:59:03 -0700 |
commit | 075821f726e534bfd012c17ce80b9aa9701a8548 (patch) | |
tree | 67f0257974a622a33d8d6848d92fc0df34b8d499 /tools/buildgen | |
parent | 27155937a862c8d3edfef82ec34bac8c4f63ecac (diff) | |
parent | 985f22e42b2404420264be0b2e21f81d1efd6b52 (diff) |
Merge pull request #3614 from dgquintas/port_server_python_version
Small changes to tools/ Python scripts
Diffstat (limited to 'tools/buildgen')
-rwxr-xr-x | tools/buildgen/generate_projects.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/buildgen/generate_projects.py b/tools/buildgen/generate_projects.py index e0bd6759bd..90abd703f6 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' @@ -55,7 +56,7 @@ for root, dirs, files in os.walk('templates'): out = out_dir + '/' + os.path.splitext(f)[0] if not os.path.exists(out_dir): os.makedirs(out_dir) - cmd = ['python', 'tools/buildgen/mako_renderer.py'] + cmd = ['python2.7', 'tools/buildgen/mako_renderer.py'] for plugin in plugins: cmd.append('-p') cmd.append(plugin) @@ -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(): |