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

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

Issue 2171733002: blink_downstream: prepare for remote_run conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: review Created 4 years, 5 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/recipes/blink_downstream.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 dbb784dde3ebf25faacbfc9c3a3771ad29c77fd1..5d5c101df3cbd5afc97625118cbcdc9b988beb6b 100644
--- a/scripts/slave/recipe_modules/chromium_tests/api.py
+++ b/scripts/slave/recipe_modules/chromium_tests/api.py
@@ -130,24 +130,28 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
dep = bot_config.get('set_component_rev')
self.m.gclient.c.revisions[dep['name']] = dep['rev_str'] % component_rev
- def ensure_checkout(self, bot_config, root_solution_revision=None,
- force=False):
- if self.m.platform.is_win:
- self.m.chromium.taskkill()
-
- kwargs = {}
+ def get_checkout_dir(self, bot_config):
try:
builder_cache = self.m.path['builder_cache']
except KeyError: # no-op if builder cache is not set up.
- pass
+ return None
else:
sanitized_buildername = ''.join(
c if c.isalnum() else '_' for c in self.m.properties['buildername'])
- checkout_path = builder_cache.join(
+ checkout_dir = builder_cache.join(
bot_config.get('checkout_dir', sanitized_buildername))
- self.m.shutil.makedirs('checkout path', checkout_path)
- kwargs['cwd'] = checkout_path
- self._working_dir = checkout_path
+ self.m.shutil.makedirs('checkout path', checkout_dir)
+ return checkout_dir
+
+ def ensure_checkout(self, bot_config, root_solution_revision=None,
+ force=False):
+ if self.m.platform.is_win:
+ self.m.chromium.taskkill()
+
+ kwargs = {}
+ self._working_dir = self.get_checkout_dir(bot_config)
+ if self._working_dir:
+ kwargs['cwd'] = self._working_dir
# Bot Update re-uses the gclient configs.
update_step = self.m.bot_update.ensure_checkout(
« no previous file with comments | « no previous file | scripts/slave/recipes/blink_downstream.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698