diff --git a/recipe_modules/bot_update/api.py b/recipe_modules/bot_update/api.py index c077ae9041..4b870a4b7e 100644 --- a/recipe_modules/bot_update/api.py +++ b/recipe_modules/bot_update/api.py @@ -57,6 +57,10 @@ class BotUpdateApi(recipe_api.RecipeApi): assert isinstance(cmd, (list, tuple)) bot_update_path = self.resource('bot_update.py') kwargs.setdefault('infra_step', True) + kwargs.setdefault('env', {}) + kwargs['env'].setdefault('PATH', '%(PATH)s') + kwargs['env']['PATH'] = self.m.path.pathsep.join([ + kwargs['env']['PATH'], str(self._module.PACKAGE_DIRECTORY)]) return self.m.python(name, bot_update_path, cmd, **kwargs) @property diff --git a/recipe_modules/bot_update/example.expected/basic.json b/recipe_modules/bot_update/example.expected/basic.json index a21bd91ddd..0cff6c0fe8 100644 --- a/recipe_modules/bot_update/example.expected/basic.json +++ b/recipe_modules/bot_update/example.expected/basic.json @@ -24,6 +24,9 @@ "src@abc" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update (without patch)", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/basic_output_manifest.json b/recipe_modules/bot_update/example.expected/basic_output_manifest.json index 8521bf0e65..170b4ab6d0 100644 --- a/recipe_modules/bot_update/example.expected/basic_output_manifest.json +++ b/recipe_modules/bot_update/example.expected/basic_output_manifest.json @@ -25,6 +25,9 @@ "--output_manifest" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json b/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json index 0275a7c6a2..214604319b 100644 --- a/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +++ b/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json @@ -25,6 +25,9 @@ "--with_branch_heads" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update - with branch heads", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/clobber.json b/recipe_modules/bot_update/example.expected/clobber.json index 3650c6e668..ee6f935c90 100644 --- a/recipe_modules/bot_update/example.expected/clobber.json +++ b/recipe_modules/bot_update/example.expected/clobber.json @@ -25,6 +25,9 @@ "--clobber" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_LOG_LINE@json.output@{@@@", diff --git a/recipe_modules/bot_update/example.expected/forced.json b/recipe_modules/bot_update/example.expected/forced.json index ca3ef96b09..07b1af6824 100644 --- a/recipe_modules/bot_update/example.expected/forced.json +++ b/recipe_modules/bot_update/example.expected/forced.json @@ -25,6 +25,9 @@ "--force" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/no_shallow.json b/recipe_modules/bot_update/example.expected/no_shallow.json index 3cb8fdf3f3..2008a4fa30 100644 --- a/recipe_modules/bot_update/example.expected/no_shallow.json +++ b/recipe_modules/bot_update/example.expected/no_shallow.json @@ -25,6 +25,9 @@ "--no_shallow" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_LOG_LINE@json.output@{@@@", diff --git a/recipe_modules/bot_update/example.expected/off.json b/recipe_modules/bot_update/example.expected/off.json index bc645fa1d0..48109b0ba0 100644 --- a/recipe_modules/bot_update/example.expected/off.json +++ b/recipe_modules/bot_update/example.expected/off.json @@ -24,6 +24,9 @@ "src@HEAD" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_LOG_LINE@json.output@{@@@", diff --git a/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json b/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json index 5d2d3d95da..e50485c41e 100644 --- a/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +++ b/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json @@ -24,6 +24,9 @@ "src@revision" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_LOG_LINE@json.output@{@@@", diff --git a/recipe_modules/bot_update/example.expected/svn_mode.json b/recipe_modules/bot_update/example.expected/svn_mode.json index 2f61227ea5..b12f9e40c7 100644 --- a/recipe_modules/bot_update/example.expected/svn_mode.json +++ b/recipe_modules/bot_update/example.expected/svn_mode.json @@ -25,6 +25,9 @@ "--force" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/trychange.json b/recipe_modules/bot_update/example.expected/trychange.json index 26cdf64454..a7aa473288 100644 --- a/recipe_modules/bot_update/example.expected/trychange.json +++ b/recipe_modules/bot_update/example.expected/trychange.json @@ -26,6 +26,9 @@ "+refs/change/1/2/333" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/trychange_oauth2.json b/recipe_modules/bot_update/example.expected/trychange_oauth2.json index a9788dc60b..c81ede5ffa 100644 --- a/recipe_modules/bot_update/example.expected/trychange_oauth2.json +++ b/recipe_modules/bot_update/example.expected/trychange_oauth2.json @@ -28,6 +28,9 @@ "src@HEAD" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/tryjob.json b/recipe_modules/bot_update/example.expected/tryjob.json index 9725c2cd16..f34e0fe7e3 100644 --- a/recipe_modules/bot_update/example.expected/tryjob.json +++ b/recipe_modules/bot_update/example.expected/tryjob.json @@ -26,6 +26,9 @@ "src@HEAD" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/tryjob_fail.json b/recipe_modules/bot_update/example.expected/tryjob_fail.json index 252ef7c596..66b377c294 100644 --- a/recipe_modules/bot_update/example.expected/tryjob_fail.json +++ b/recipe_modules/bot_update/example.expected/tryjob_fail.json @@ -26,6 +26,9 @@ "src@HEAD" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "step returned non-zero exit code: 1", diff --git a/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json b/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json index 0b968135ac..9e2cd6f8de 100644 --- a/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +++ b/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json @@ -26,6 +26,9 @@ "src@HEAD" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json b/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json index 88da29c2fa..e7a93bdf1a 100644 --- a/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +++ b/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json @@ -26,6 +26,9 @@ "src@HEAD" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@", diff --git a/recipe_modules/bot_update/example.expected/tryjob_v8.json b/recipe_modules/bot_update/example.expected/tryjob_v8.json index 8017c26ddb..f426d8b953 100644 --- a/recipe_modules/bot_update/example.expected/tryjob_v8.json +++ b/recipe_modules/bot_update/example.expected/tryjob_v8.json @@ -28,6 +28,9 @@ "src/v8@abc" ], "cwd": "[SLAVE_BUILD]", + "env": { + "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" + }, "name": "bot_update", "~followup_annotations": [ "@@@STEP_TEXT@Some step text@@@",