depot_tools: expose paths to presubmit_support.py and upload_to_google_storage.py

They're needed by infra recipes (https://codereview.chromium.org/2045493002).

BUG=617565

Review-Url: https://codereview.chromium.org/2045473002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300695 0039d316-1c4b-4281-b951-d872f2087c98
parent 074c2afe
......@@ -9,6 +9,10 @@ class DepotToolsApi(recipe_api.RecipeApi):
def download_from_google_storage_path(self):
return self.package_repo_resource('download_from_google_storage.py')
@property
def upload_to_google_storage_path(self):
return self.package_repo_resource('upload_to_google_storage.py')
@property
def cros_path(self):
return self.package_repo_resource('cros')
......
......@@ -6,6 +6,13 @@
],
"name": "download_from_google_storage"
},
{
"cmd": [
"ls",
"RECIPE_PACKAGE_REPO[depot_tools]/upload_to_google_storage.py"
],
"name": "upload_to_google_storage"
},
{
"cmd": [
"ls",
......
......@@ -6,6 +6,13 @@
],
"name": "download_from_google_storage"
},
{
"cmd": [
"ls",
"RECIPE_PACKAGE_REPO[depot_tools]\\upload_to_google_storage.py"
],
"name": "upload_to_google_storage"
},
{
"cmd": [
"ls",
......
......@@ -15,6 +15,10 @@ def RunSteps(api):
'download_from_google_storage',
['ls', api.depot_tools.download_from_google_storage_path])
api.step(
'upload_to_google_storage',
['ls', api.depot_tools.upload_to_google_storage_path])
api.step('cros', ['ls', api.depot_tools.cros_path])
api.step(
......
......@@ -5,6 +5,10 @@
from recipe_engine import recipe_api
class PresubmitApi(recipe_api.RecipeApi):
@property
def presubmit_support_path(self):
return self.package_repo_resource('presubmit_support.py')
def __call__(self, *args, **kwargs):
"""Return a presubmit step."""
......@@ -16,5 +20,4 @@ class PresubmitApi(recipe_api.RecipeApi):
kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
return self.m.python(
name, self.package_repo_resource('presubmit_support.py'), list(args),
**kwargs)
name, self.presubmit_support_path, list(args), **kwargs)
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