gclient: add depot_tools to PATH

BUG=437264

Review URL: https://codereview.chromium.org/1676473002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298614 0039d316-1c4b-4281-b951-d872f2087c98
changes/01/332501/1
phajdan.jr@chromium.org 10 years ago
parent 9e45c71356
commit edf62ce445

@ -90,6 +90,11 @@ class GclientApi(recipe_api.RecipeApi):
if self.spec_alias: if self.spec_alias:
prefix = ('[spec: %s] ' % self.spec_alias) + prefix prefix = ('[spec: %s] ' % self.spec_alias) + prefix
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(prefix + name, return self.m.python(prefix + name,
self.package_resource('gclient.py'), self.package_resource('gclient.py'),
cmd, cmd,

@ -9,6 +9,9 @@
"cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]" "cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient setup" "name": "gclient setup"
}, },
{ {
@ -30,6 +33,9 @@
"/path/to/tmp/json" "/path/to/tmp/json"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient sync", "name": "gclient sync",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@{@@@",
@ -54,6 +60,9 @@
"local_bot" "local_bot"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient recurse (git config user.name)" "name": "gclient recurse (git config user.name)"
}, },
{ {
@ -68,6 +77,9 @@
"local_bot@example.com" "local_bot@example.com"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient recurse (git config user.email)" "name": "gclient recurse (git config user.email)"
}, },
{ {
@ -80,6 +92,9 @@
"cache_dir = None\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]" "cache_dir = None\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "[spec: WebKit] gclient setup" "name": "[spec: WebKit] gclient setup"
}, },
{ {
@ -99,6 +114,9 @@
"/path/to/tmp/json" "/path/to/tmp/json"
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "[spec: WebKit] gclient sync", "name": "[spec: WebKit] gclient sync",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@{@@@",
@ -147,6 +165,9 @@
"runhooks" "runhooks"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient runhooks" "name": "gclient runhooks"
}, },
{ {

@ -9,6 +9,9 @@
"cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]" "cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient setup" "name": "gclient setup"
}, },
{ {
@ -32,6 +35,9 @@
"/path/to/tmp/json" "/path/to/tmp/json"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient sync", "name": "gclient sync",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@{@@@",
@ -56,6 +62,9 @@
"local_bot" "local_bot"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient recurse (git config user.name)" "name": "gclient recurse (git config user.name)"
}, },
{ {
@ -70,6 +79,9 @@
"local_bot@example.com" "local_bot@example.com"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient recurse (git config user.email)" "name": "gclient recurse (git config user.email)"
}, },
{ {
@ -82,6 +94,9 @@
"cache_dir = None\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]" "cache_dir = None\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "[spec: WebKit] gclient setup" "name": "[spec: WebKit] gclient setup"
}, },
{ {
@ -101,6 +116,9 @@
"/path/to/tmp/json" "/path/to/tmp/json"
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "[spec: WebKit] gclient sync", "name": "[spec: WebKit] gclient sync",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@{@@@",
@ -149,6 +167,9 @@
"runhooks" "runhooks"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient runhooks" "name": "gclient runhooks"
}, },
{ {

@ -9,6 +9,9 @@
"cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]" "cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient setup" "name": "gclient setup"
}, },
{ {
@ -32,6 +35,9 @@
"/path/to/tmp/json" "/path/to/tmp/json"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient sync", "name": "gclient sync",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@{@@@",
@ -56,6 +62,9 @@
"local_bot" "local_bot"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient recurse (git config user.name)" "name": "gclient recurse (git config user.name)"
}, },
{ {
@ -70,6 +79,9 @@
"local_bot@example.com" "local_bot@example.com"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient recurse (git config user.email)" "name": "gclient recurse (git config user.email)"
}, },
{ {
@ -82,6 +94,9 @@
"cache_dir = None\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]" "cache_dir = None\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "[spec: WebKit] gclient setup" "name": "[spec: WebKit] gclient setup"
}, },
{ {
@ -112,6 +127,9 @@
"/path/to/tmp/json" "/path/to/tmp/json"
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "[spec: WebKit] gclient sync", "name": "[spec: WebKit] gclient sync",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@", "@@@STEP_LOG_LINE@json.output@{@@@",
@ -160,6 +178,9 @@
"runhooks" "runhooks"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
},
"name": "gclient runhooks" "name": "gclient runhooks"
}, },
{ {

Loading…
Cancel
Save