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

Unified Diff: scripts/slave/recipe_modules/filter/api.py

Issue 1416763007: Add a recipe to identify culprits for chromium compile failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Rebase and Address comments. Created 5 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/filter/api.py
diff --git a/scripts/slave/recipe_modules/filter/api.py b/scripts/slave/recipe_modules/filter/api.py
index 359c2a41fd41ff613af68a88497effc3d021f945..e795b96a9eed5f1a9e3ecb4b0e252d4f89572f61 100644
--- a/scripts/slave/recipe_modules/filter/api.py
+++ b/scripts/slave/recipe_modules/filter/api.py
@@ -160,14 +160,25 @@ class FilterApi(recipe_api.RecipeApi):
# Ensure that mb runs in a clean environment to avoid
# picking up any GYP_DEFINES accidentally.
del kwargs['env']
+ # We need to use the actual mastername and buildername we're running on,
Paweł Hajdan Jr. 2015/11/24 13:20:41 Could you extract this to a separate CL? Such chan
stgao 2015/11/24 23:19:19 Done. https://codereview.chromium.org/1474473004/
+ # because it may be configured with different MB settings from those for
+ # the continuous builder a trybot may be configured to match.
+ # However, use target_mastername and target_buildername instead if they
+ # are available in the build properties. This gives a recipe running on a
+ # trybot the flexibility to run MB in exactly the same configuration as
+ # the continuous builder it tries to match.
+ target_mastername = (self.m.properties.get('target_mastername') or
+ self.m.properties['mastername'])
+ target_buildername = (self.m.properties.get('target_buildername') or
+ self.m.properties['buildername'])
step_result = self.m.python(
'analyze',
self.m.path['checkout'].join('tools', 'mb', 'mb.py'),
args=['analyze',
'-m',
- self.m.properties['mastername'],
+ target_mastername,
'-b',
- self.m.properties['buildername'],
+ target_buildername,
'-v',
build_output_dir,
self.m.json.input(analyze_input),

Powered by Google App Engine
This is Rietveld 408576698