diff options
author | Eric Boren <borenet@google.com> | 2017-04-10 11:23:04 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-10 16:01:46 +0000 |
commit | 68a58ea755e172421f99c25b8130a23cdfd36145 (patch) | |
tree | 71413e2dda2e64aaf2580064625f2b042d06905d /infra | |
parent | b8ab7f7634fc986962fdcdb70c7037a9d5b2ca9c (diff) |
Recipes: Remove depot_tools path hack
Bug: skia:6473
Change-Id: I722059844bb0bc9d58347b4f6002ee62043b9e20
Reviewed-on: https://skia-review.googlesource.com/13006
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra')
8 files changed, 12 insertions, 19 deletions
diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py index a40271e788..ad2f3e95e6 100644 --- a/infra/bots/recipe_modules/vars/api.py +++ b/infra/bots/recipe_modules/vars/api.py @@ -29,6 +29,7 @@ class SkiaVarsApi(recipe_api.RecipeApi): self.slave_dir = self.m.path['start_dir'] self.checkout_root = self.slave_dir self.default_env = self.m.step.get_from_context('env', {}) + self.default_env['CHROME_HEADLESS'] = '1' self.default_env['PATH'] = self.m.path.pathsep.join([ self.default_env.get('PATH', '%(PATH)s'), str(self.m.bot_update._module.PACKAGE_REPO_ROOT), @@ -36,16 +37,6 @@ class SkiaVarsApi(recipe_api.RecipeApi): self.gclient_env = {} self.is_compile_bot = self.builder_name.startswith('Build-') - self.default_env['CHROME_HEADLESS'] = '1' - # The 'depot_tools' directory comes from recipe DEPS and isn't provided by - # default. We have to set it manually. - self.m.path.c.base_paths['depot_tools'] = ( - self.m.path.c.base_paths['start_dir'] + - ('skia', 'infra', 'bots', '.recipe_deps', 'depot_tools')) - if 'Win' in self.builder_name: - self.m.path.c.base_paths['depot_tools'] = ( - 'c:\\', 'Users', 'chrome-bot', 'depot_tools') - # Compile bots keep a persistent checkout. self.persistent_checkout = (self.is_compile_bot or 'RecreateSKPs' in self.builder_name or diff --git a/infra/bots/recipes/housekeeper.expected/Housekeeper-PerCommit-Trybot.json b/infra/bots/recipes/housekeeper.expected/Housekeeper-PerCommit-Trybot.json index a85dc852e8..96e434cd23 100644 --- a/infra/bots/recipes/housekeeper.expected/Housekeeper-PerCommit-Trybot.json +++ b/infra/bots/recipes/housekeeper.expected/Housekeeper-PerCommit-Trybot.json @@ -112,7 +112,7 @@ "--githash", "abc123", "--gsutil_path", - "[DEPOT_TOOLS]/gsutil.py", + "RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py", "--issue_number", "456789" ], diff --git a/infra/bots/recipes/housekeeper.expected/Housekeeper-PerCommit.json b/infra/bots/recipes/housekeeper.expected/Housekeeper-PerCommit.json index fa7d584bcd..64a91a8dbd 100644 --- a/infra/bots/recipes/housekeeper.expected/Housekeeper-PerCommit.json +++ b/infra/bots/recipes/housekeeper.expected/Housekeeper-PerCommit.json @@ -122,7 +122,7 @@ "--githash", "abc123", "--gsutil_path", - "[DEPOT_TOOLS]/gsutil.py" + "RECIPE_PACKAGE_REPO[depot_tools]/gsutil.py" ], "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { diff --git a/infra/bots/recipes/housekeeper.py b/infra/bots/recipes/housekeeper.py index 5e75a86fc1..e62edd6383 100644 --- a/infra/bots/recipes/housekeeper.py +++ b/infra/bots/recipes/housekeeper.py @@ -6,6 +6,7 @@ # Recipe for the Skia PerCommit Housekeeper. DEPS = [ + 'depot_tools/bot_update', 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/python', @@ -35,7 +36,7 @@ def RunSteps(api): # TODO(borenet): Detect static initializers? with api.step.context({'cwd': cwd}): - gsutil_path = api.path['depot_tools'].join('gsutil.py') + gsutil_path = api.bot_update._module.PACKAGE_REPO_ROOT.join('gsutil.py') if not api.vars.is_trybot: api.run( api.step, diff --git a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json index 8d87d89ed7..9c2c3e0616 100644 --- a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json +++ b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json @@ -186,7 +186,7 @@ "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { "CHROME_HEADLESS": "1", - "PATH": "[DEPOT_TOOLS]:%(PATH)s" + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s" }, "name": "Recreate SKPs" }, diff --git a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json index 8c0d4385e2..82fe11cf40 100644 --- a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json +++ b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json @@ -187,7 +187,7 @@ "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { "CHROME_HEADLESS": "1", - "PATH": "[DEPOT_TOOLS]:%(PATH)s" + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s" }, "name": "Recreate SKPs" }, @@ -247,7 +247,7 @@ "env": { "CHROME_HEADLESS": "1", "GOPATH": "[CUSTOM_/_B_WORK]/gopath", - "PATH": "[DEPOT_TOOLS]:%(PATH)s" + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s" }, "name": "Upload SKPs" }, diff --git a/infra/bots/recipes/recreate_skps.expected/failed_upload.json b/infra/bots/recipes/recreate_skps.expected/failed_upload.json index 819e7580bb..99fdc0a3c0 100644 --- a/infra/bots/recipes/recreate_skps.expected/failed_upload.json +++ b/infra/bots/recipes/recreate_skps.expected/failed_upload.json @@ -187,7 +187,7 @@ "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { "CHROME_HEADLESS": "1", - "PATH": "[DEPOT_TOOLS]:%(PATH)s" + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s" }, "name": "Recreate SKPs" }, @@ -247,7 +247,7 @@ "env": { "CHROME_HEADLESS": "1", "GOPATH": "[CUSTOM_/_B_WORK]/gopath", - "PATH": "[DEPOT_TOOLS]:%(PATH)s" + "PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s" }, "name": "Upload SKPs", "~followup_annotations": [ diff --git a/infra/bots/recipes/recreate_skps.py b/infra/bots/recipes/recreate_skps.py index 20937b768d..36df265501 100644 --- a/infra/bots/recipes/recreate_skps.py +++ b/infra/bots/recipes/recreate_skps.py @@ -107,7 +107,8 @@ def RunSteps(api): api.file.makedirs('skp_output', output_dir) # Capture the SKPs. - path_var= api.path.pathsep.join([str(api.path['depot_tools']), '%(PATH)s']) + path_var= api.path.pathsep.join([ + str(api.gclient._module.PACKAGE_REPO_ROOT), '%(PATH)s']) env = { 'CHROME_HEADLESS': '1', 'PATH': path_var, |