[windows_sdk] Default to cache/windows_sdk.

This should allow better integration with buildbucket named cache
support. Since this was already parameterized it shouldn't actually
break anything; previously the directory would be deleted on every run,
now it will still be deleted on every run (but we can add a buildbucket
named cache entry for it to preserve it).

R=tandrii@chromium.org, vadimsh@chromium.org

Bug: 877775
Change-Id: I1184fb59a3ed18bfda5fcb288903201b01527096
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Reviewed-on: https://chromium-review.googlesource.com/c/1263861
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
changes/61/1263861/5
Robert Iannucci 7 years ago committed by Commit Bot
parent 0c3bd49069
commit 85af45334e

@ -869,7 +869,7 @@ Setups the SDK environment when enabled.
Args: Args:
path (path): Path to a directory where to install the SDK path (path): Path to a directory where to install the SDK
(default is '[start_dir]/windows_sdk') (default is '[CACHE]/windows_sdk')
version (str): CIPD version of the SDK version (str): CIPD version of the SDK
(default is set via $infra/windows_sdk.version property) (default is set via $infra/windows_sdk.version property)
enabled (bool): Whether the SDK should be used or not. enabled (bool): Whether the SDK should be used or not.

@ -26,7 +26,7 @@ class WindowsSDKApi(recipe_api.RecipeApi):
Args: Args:
path (path): Path to a directory where to install the SDK path (path): Path to a directory where to install the SDK
(default is '[start_dir]/windows_sdk') (default is '[CACHE]/windows_sdk')
version (str): CIPD version of the SDK version (str): CIPD version of the SDK
(default is set via $infra/windows_sdk.version property) (default is set via $infra/windows_sdk.version property)
enabled (bool): Whether the SDK should be used or not. enabled (bool): Whether the SDK should be used or not.
@ -36,7 +36,7 @@ class WindowsSDKApi(recipe_api.RecipeApi):
""" """
if enabled: if enabled:
sdk_dir = self._ensure_sdk( sdk_dir = self._ensure_sdk(
path or self.m.path['start_dir'].join('windows_sdk'), path or self.m.path['cache'].join('windows_sdk'),
version or self._sdk_properties['version']) version or self._sdk_properties['version'])
try: try:
with self.m.context(**self._sdk_env(sdk_dir)): with self.m.context(**self._sdk_env(sdk_dir)):

@ -4,7 +4,7 @@
"cipd.bat", "cipd.bat",
"ensure", "ensure",
"-root", "-root",
"[START_DIR]\\windows_sdk", "[CACHE]\\windows_sdk",
"-ensure-file", "-ensure-file",
"chrome_internal/third_party/sdk/windows uploaded:2018-06-13", "chrome_internal/third_party/sdk/windows uploaded:2018-06-13",
"-json-output", "-json-output",
@ -31,7 +31,7 @@
"python", "python",
"-u", "-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
"[START_DIR]\\windows_sdk\\win_sdk\\bin\\SetEnv.x64.json", "[CACHE]\\windows_sdk\\win_sdk\\bin\\SetEnv.x64.json",
"/path/to/tmp/json" "/path/to/tmp/json"
], ],
"name": "read SetEnv.x64.json", "name": "read SetEnv.x64.json",
@ -65,11 +65,11 @@
"out/Release" "out/Release"
], ],
"env": { "env": {
"VSINSTALLDIR": "[START_DIR]\\windows_sdk" "VSINSTALLDIR": "[CACHE]\\windows_sdk"
}, },
"env_prefixes": { "env_prefixes": {
"PATH": [ "PATH": [
"[START_DIR]\\windows_sdk\\win_sdk\\bin\\x64" "[CACHE]\\windows_sdk\\win_sdk\\bin\\x64"
] ]
}, },
"name": "gn" "name": "gn"
@ -81,11 +81,11 @@
"out/Release" "out/Release"
], ],
"env": { "env": {
"VSINSTALLDIR": "[START_DIR]\\windows_sdk" "VSINSTALLDIR": "[CACHE]\\windows_sdk"
}, },
"env_prefixes": { "env_prefixes": {
"PATH": [ "PATH": [
"[START_DIR]\\windows_sdk\\win_sdk\\bin\\x64" "[CACHE]\\windows_sdk\\win_sdk\\bin\\x64"
] ]
}, },
"name": "ninja" "name": "ninja"

Loading…
Cancel
Save