deprecate depot_tools path

Use depot_tools module's methods or package_repo_resource function to
determine paths of tools that live in depot_tools

R=iannucci@chromium.org, martiniss@chromium.org
BUG=662586

Change-Id: Ic3172308c140f7f19e982ec6ec5a4b1b83261e1b
Reviewed-on: https://chromium-review.googlesource.com/411936
Reviewed-by: Erik Staab <estaab@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
changes/36/411936/4
Nodir Turakulov 9 years ago committed by Commit Bot
parent e164056d2a
commit cb1beaa79f

@ -5,8 +5,8 @@
DEPS = [
'bot_update',
'gclient',
'recipe_engine/platform',
'recipe_engine/path',
'recipe_engine/platform',
'recipe_engine/properties',
]

@ -31,3 +31,7 @@ class DepotToolsApi(recipe_api.RecipeApi):
def ninja_path(self):
ninja_exe = 'ninja.exe' if self.m.platform.is_win else 'ninja'
return self.package_repo_resource(ninja_exe)
@property
def presubmit_support_py_path(self):
return self.package_repo_resource('presubmit_support.py')

@ -41,6 +41,13 @@
],
"name": "ninja_path"
},
{
"cmd": [
"ls",
"RECIPE_PACKAGE_REPO[depot_tools]/presubmit_support.py"
],
"name": "presubmit_support_py_path"
},
{
"name": "$result",
"recipe_result": null,

@ -41,6 +41,13 @@
],
"name": "ninja_path"
},
{
"cmd": [
"ls",
"RECIPE_PACKAGE_REPO[depot_tools]\\presubmit_support.py"
],
"name": "presubmit_support_py_path"
},
{
"name": "$result",
"recipe_result": null,

@ -30,6 +30,9 @@ def RunSteps(api):
api.step(
'ninja_path', ['ls', api.depot_tools.ninja_path])
api.step(
'presubmit_support_py_path',
['ls', api.depot_tools.presubmit_support_py_path])
def GenTests(api):

@ -251,10 +251,11 @@ class GclientApi(recipe_api.RecipeApi):
alias = self.spec_alias
prefix = '%sgclient ' % (('[spec: %s] ' % alias) if alias else '')
gclient_path = self.package_repo_resource(
'gclient.bat' if self.m.platform.is_win else 'gclient')
return self.m.python(prefix + 'revert',
self.m.path['build'].join('scripts', 'slave', 'gclient_safe_revert.py'),
['.', self.m.path['depot_tools'].join('gclient',
platform_ext={'win': '.bat'})],
['.', gclient_path],
infra_step=True,
**kwargs
)

@ -67,7 +67,7 @@ class RietveldApi(recipe_api.RecipeApi):
if authentication == 'oauth2':
step_result = self.m.python(
'apply_issue',
self.m.path['depot_tools'].join('apply_issue.py'), [
self.package_repo_resource('apply_issue.py'), [
'-r', self.m.path['checkout'].join(*root_pieces),
'-i', issue_number,
'-p', self.m.properties['patchset'],
@ -82,7 +82,7 @@ class RietveldApi(recipe_api.RecipeApi):
else:
step_result = self.m.python(
'apply_issue',
self.m.path['depot_tools'].join('apply_issue.py'), [
self.package_repo_resource('apply_issue.py'), [
'-r', self.m.path['checkout'].join(*root_pieces),
'-i', issue_number,
'-p', self.m.properties['patchset'],

@ -3,7 +3,7 @@
"cmd": [
"python",
"-u",
"[DEPOT_TOOLS]/apply_issue.py",
"RECIPE_PACKAGE_REPO[depot_tools]/apply_issue.py",
"-r",
"[START_DIR]/foo/bar",
"-i",

@ -3,7 +3,7 @@
"cmd": [
"python",
"-u",
"[DEPOT_TOOLS]/apply_issue.py",
"RECIPE_PACKAGE_REPO[depot_tools]/apply_issue.py",
"-r",
"[START_DIR]",
"-i",

@ -3,7 +3,7 @@
"cmd": [
"python",
"-u",
"[DEPOT_TOOLS]/apply_issue.py",
"RECIPE_PACKAGE_REPO[depot_tools]/apply_issue.py",
"-r",
"[START_DIR]",
"-i",

Loading…
Cancel
Save