aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/buildgen
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-10-05 16:24:18 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-10-05 16:24:18 -0700
commit6a739c715321c7249ce17b3ff3fbd6594c10af2f (patch)
tree069822e02bf4dfed492bbb345e8b7bf24029b384 /tools/buildgen
parentf747bbc04327c9ef02690cd7466ec6786967c4fe (diff)
parentd48c5a5b9feb9cfacde4741e92d6dfcdae632416 (diff)
Merge branch 'master' of github.com:grpc/grpc into cq_alarm
Diffstat (limited to 'tools/buildgen')
-rwxr-xr-xtools/buildgen/generate_projects.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/buildgen/generate_projects.py b/tools/buildgen/generate_projects.py
index 5738dc3f7f..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'
@@ -73,13 +74,13 @@ for root, dirs, files in os.walk('templates'):
cmd.append(root + '/' + f)
jobs.append(jobset.JobSpec(cmd, shortname=out))
-jobset.run(jobs, maxjobs=4)
+jobset.run(jobs, maxjobs=multiprocessing.cpu_count())
if test is not None:
for s, g in test.iteritems():
if os.path.isfile(g):
- assert(0 == os.system('diff %s %s' % (s, g)))
+ assert 0 == os.system('diff %s %s' % (s, g)), s
os.unlink(g)
else:
- assert(0 == os.system('diff -r %s %s' % (s, g)))
+ assert 0 == os.system('diff -r %s %s' % (s, g)), s
shutil.rmtree(g, ignore_errors=True)