Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1357)

Unified Diff: scripts/slave/recipe_modules/goma/example.py

Issue 2480193002: Stop to use contextmanager for goma.build_with_goma (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/goma/example.py
diff --git a/scripts/slave/recipe_modules/goma/example.py b/scripts/slave/recipe_modules/goma/example.py
index 134b782f3569d6a0942db321f8cd55a2a8ce0e09..553464c91f5066416e0db6d313a0e0d81a1a2eff 100644
--- a/scripts/slave/recipe_modules/goma/example.py
+++ b/scripts/slave/recipe_modules/goma/example.py
@@ -21,22 +21,14 @@ def RunSteps(api):
allow_build_without_goma = api.properties.get(
'allow_build_without_goma', False)
- with api.goma.build_with_goma(
+ api.goma.build_with_goma(
+ name='ninja',
ninja_log_outdir=api.properties.get('ninja_log_outdir'),
ninja_log_compiler=api.properties.get('ninja_log_compiler'),
- ninja_log_command=command,
+ ninja_command=command,
allow_build_without_goma=allow_build_without_goma,
- env=env):
- if 'GOMA_DISABLED' in env:
- api.goma.remove_j_flag(command)
- api.step('ninja', command, env=env)
- else:
- # build something using goma.
- api.step('echo goma jobs',
- ['echo', str(api.goma.recommended_goma_jobs)])
- api.step('echo goma jobs second',
- ['echo', str(api.goma.recommended_goma_jobs)])
- api.step('ninja', command, env=env)
+ goma_env=env)
+
def GenTests(api):
for platform in ('linux', 'win', 'mac'):
@@ -45,7 +37,7 @@ def GenTests(api):
'mastername': 'test_master',
'slavename': 'test_slave',
'clobber': '1',
- 'build_command': ['ninja', '-C', 'out/Release', '-j', '500'],
+ 'build_command': ['ninja', '-j', '80', '-C', 'out/Release'],
'ninja_log_outdir': 'out/Release',
'ninja_log_compiler': 'goma',
'build_data_dir': 'build_data_dir',
« no previous file with comments | « scripts/slave/recipe_modules/goma/api.py ('k') | scripts/slave/recipe_modules/goma/example.expected/linux.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698