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

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

Issue 2327543002: chromium_tests: add an option to disable deapplying patch on some trybots (Closed)
Patch Set: rebase Created 4 years, 3 months 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
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium_tests/trybots.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/chromium_tests/api.py
diff --git a/scripts/slave/recipe_modules/chromium_tests/api.py b/scripts/slave/recipe_modules/chromium_tests/api.py
index a69aa999aebe3dd603cb25d4b85f55a8179ebacc..941ce3a9fdcdbea24c41aefc2bcde916e30708c6 100644
--- a/scripts/slave/recipe_modules/chromium_tests/api.py
+++ b/scripts/slave/recipe_modules/chromium_tests/api.py
@@ -687,7 +687,7 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
def run_tests_on_tryserver(self, bot_config, api, tests, bot_update_step,
affected_files, mb_mastername=None,
- mb_buildername=None):
+ mb_buildername=None, disable_deapply_patch=False):
def deapply_patch_fn(failing_tests):
self.deapply_patch(bot_update_step)
compile_targets = list(itertools.chain(
@@ -714,6 +714,9 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
deapply_patch = False
deapply_patch_reason = 'build config changes detected'
break
+ if disable_deapply_patch:
+ deapply_patch = False
+ deapply_patch_reason = 'disabled in recipes'
with self.wrap_chromium_tests(bot_config, tests):
if deapply_patch:
@@ -860,14 +863,15 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
def trybot_steps(api):
with api.tryserver.set_failure_hash():
try:
- bot_config_object, bot_update_step, affected_files, tests = \
- ChromiumTestsApi._trybot_steps_internal(api)
+ (bot_config_object, bot_update_step, affected_files, tests,
+ disable_deapply_patch) = ChromiumTestsApi._trybot_steps_internal(api)
finally:
api.python.succeeding_step('mark: before_tests', '')
if tests:
api.chromium_tests.run_tests_on_tryserver(
- bot_config_object, api, tests, bot_update_step, affected_files)
+ bot_config_object, api, tests, bot_update_step, affected_files,
+ disable_deapply_patch=disable_deapply_patch)
@staticmethod
# TODO(phajdan.jr): try to get rid of api parameter.
@@ -989,7 +993,9 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
else:
tests = []
- return bot_config_object, bot_update_step, affected_files, tests
+ disable_deapply_patch = not bot_config.get('deapply_patch', True)
+ return (bot_config_object, bot_update_step, affected_files, tests,
+ disable_deapply_patch)
@staticmethod
def _all_compile_targets(api, tests):
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium_tests/trybots.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698