Commit a870c969 authored by Yoshisato Yanagisawa's avatar Yoshisato Yanagisawa Committed by Commit Bot

recipe_modules/depot_tools: export autoninja_path

Make autoninja path also available via depot_tools recipe module,
and make autoninja used where it is needed.

Bug: b/77176746
Change-Id: I8553cb3fb32f98e2e3ff420c255461b7e7da7df6
Reviewed-on: https://chromium-review.googlesource.com/c/1293112Reviewed-by: 's avatarFumitoshi Ukai <ukai@chromium.org>
Reviewed-by: 's avatarShinya Kawanaka <shinyak@chromium.org>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
parent 0db62fcf
......@@ -207,6 +207,8 @@ the depot_tools repo.
#### **class [DepotToolsApi](/recipes/recipe_modules/depot_tools/api.py#12)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
&emsp; **@property**<br>&mdash; **def [autoninja\_path](/recipes/recipe_modules/depot_tools/api.py#45)(self):**
&emsp; **@property**<br>&mdash; **def [cros\_path](/recipes/recipe_modules/depot_tools/api.py#26)(self):**
&emsp; **@property**<br>&mdash; **def [download\_from\_google\_storage\_path](/recipes/recipe_modules/depot_tools/api.py#13)(self):**
......@@ -217,7 +219,7 @@ the depot_tools repo.
&emsp; **@property**<br>&mdash; **def [ninja\_path](/recipes/recipe_modules/depot_tools/api.py#40)(self):**
&emsp; **@contextlib.contextmanager**<br>&mdash; **def [on\_path](/recipes/recipe_modules/depot_tools/api.py#49)(self):**
&emsp; **@contextlib.contextmanager**<br>&mdash; **def [on\_path](/recipes/recipe_modules/depot_tools/api.py#54)(self):**
Use this context manager to put depot_tools on $PATH.
......@@ -226,7 +228,7 @@ Example:
with api.depot_tools.on_path():
# run some steps
&emsp; **@property**<br>&mdash; **def [presubmit\_support\_py\_path](/recipes/recipe_modules/depot_tools/api.py#45)(self):**
&emsp; **@property**<br>&mdash; **def [presubmit\_support\_py\_path](/recipes/recipe_modules/depot_tools/api.py#50)(self):**
&emsp; **@property**<br>&mdash; **def [root](/recipes/recipe_modules/depot_tools/api.py#21)(self):**
......
......@@ -42,6 +42,11 @@ class DepotToolsApi(recipe_api.RecipeApi):
ninja_exe = 'ninja.exe' if self.m.platform.is_win else 'ninja'
return self.package_repo_resource(ninja_exe)
@property
def autoninja_path(self):
autoninja = 'autoninja.bat' if self.m.platform.is_win else 'autoninja'
return self.package_repo_resource(autoninja)
@property
def presubmit_support_py_path(self):
return self.package_repo_resource('presubmit_support.py')
......
......@@ -48,6 +48,13 @@
],
"name": "ninja_path"
},
{
"cmd": [
"ls",
"RECIPE_PACKAGE_REPO[depot_tools]/autoninja"
],
"name": "autoninja_path"
},
{
"cmd": [
"ls",
......
......@@ -48,6 +48,13 @@
],
"name": "ninja_path"
},
{
"cmd": [
"ls",
"RECIPE_PACKAGE_REPO[depot_tools]/autoninja"
],
"name": "autoninja_path"
},
{
"cmd": [
"ls",
......
......@@ -48,6 +48,13 @@
],
"name": "ninja_path"
},
{
"cmd": [
"ls",
"RECIPE_PACKAGE_REPO[depot_tools]\\autoninja.bat"
],
"name": "autoninja_path"
},
{
"cmd": [
"ls",
......
......@@ -33,6 +33,9 @@ def RunSteps(api):
api.step(
'ninja_path', ['ls', api.depot_tools.ninja_path])
api.step(
'autoninja_path', ['ls', api.depot_tools.autoninja_path])
api.step(
'presubmit_support_py_path',
['ls', api.depot_tools.presubmit_support_py_path])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment