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

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

Issue 2105873004: chromium_tests: set cwd to directory containing checkout for tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 6 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/chromium.expected/full_chromium_fyi_Linux_remote_run_Tester.json » ('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 4fa44f2ce533601fe503345ff7a2e49eae20635b..db4ef7c8ee47e6cf033c1e09a3310306c2c292d9 100644
--- a/scripts/slave/recipe_modules/chromium_tests/api.py
+++ b/scripts/slave/recipe_modules/chromium_tests/api.py
@@ -50,6 +50,10 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
self.add_builders(builders.BUILDERS)
self._precommit_mode = False
+ # Keep track of working directory (which contains the checkout).
+ # None means "default value".
+ self._working_dir = None
+
@property
def builders(self):
return self._builders
@@ -166,6 +170,7 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
bot_config.get('checkout_dir', sanitized_buildername))
self.m.shutil.makedirs('checkout path', checkout_path)
kwargs['cwd'] = checkout_path
+ self._working_dir = checkout_path
# Bot Update re-uses the gclient configs.
update_step = self.m.bot_update.ensure_checkout(
@@ -519,7 +524,13 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
@contextlib.contextmanager
def wrap_chromium_tests(self, bot_config, tests=None):
- with self.m.step.context({'env': self.m.chromium.get_env()}):
+ context = {'env': self.m.chromium.get_env()}
+ # TODO(phajdan.jr): Enable globally after confirming it works.
+ if bot_config.matches_any_bot_id(
+ lambda bot_id: 'remote_run' in bot_id['buildername'] or
+ 'remote_run' in bot_id.get('tester', '')):
+ context['cwd'] = self._working_dir
+ with self.m.step.context(context):
bot_type = bot_config.get('bot_type', 'builder_tester')
if bot_type in ('tester', 'builder_tester'):
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.expected/full_chromium_fyi_Linux_remote_run_Tester.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698