Commit 25b2cb49 authored by Henrique Nakashima's avatar Henrique Nakashima Committed by LUCI CQ

[recipe_modules/depot_tools] Add dirmd_path to api

This is required to parse DIR_METADATA files.

Bug: 1135347
Change-Id: I620656d4dbec5e918bfc0f535397869c869446b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2644827
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@google.com>
parent 801121c2
......@@ -241,6 +241,8 @@ the depot_tools repo.
&emsp; **@property**<br>&mdash; **def [cros\_path](/recipes/recipe_modules/depot_tools/api.py#26)(self):**
&emsp; **@property**<br>&mdash; **def [dirmd\_path](/recipes/recipe_modules/depot_tools/api.py#54)(self):**
&emsp; **@property**<br>&mdash; **def [download\_from\_google\_storage\_path](/recipes/recipe_modules/depot_tools/api.py#13)(self):**
&emsp; **@property**<br>&mdash; **def [gn\_py\_path](/recipes/recipe_modules/depot_tools/api.py#30)(self):**
......@@ -249,7 +251,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#54)(self):**
&emsp; **@contextlib.contextmanager**<br>&mdash; **def [on\_path](/recipes/recipe_modules/depot_tools/api.py#58)(self):**
Use this context manager to put depot_tools on $PATH.
......
......@@ -51,6 +51,10 @@ class DepotToolsApi(recipe_api.RecipeApi):
def presubmit_support_py_path(self):
return self.repo_resource('presubmit_support.py')
@property
def dirmd_path(self):
return self.repo_resource('dirmd')
@contextlib.contextmanager
def on_path(self):
"""Use this context manager to put depot_tools on $PATH.
......
......@@ -62,6 +62,13 @@
],
"name": "presubmit_support_py_path"
},
{
"cmd": [
"ls",
"RECIPE_REPO[depot_tools]/dirmd"
],
"name": "dirmd_path"
},
{
"cmd": [
"echo",
......
......@@ -62,6 +62,13 @@
],
"name": "presubmit_support_py_path"
},
{
"cmd": [
"ls",
"RECIPE_REPO[depot_tools]\\dirmd"
],
"name": "dirmd_path"
},
{
"cmd": [
"echo",
......
......@@ -40,6 +40,9 @@ def RunSteps(api):
'presubmit_support_py_path',
['ls', api.depot_tools.presubmit_support_py_path])
api.step(
'dirmd_path', ['ls', api.depot_tools.dirmd_path])
with api.depot_tools.on_path():
api.step('on_path', ['echo', '$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