Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 6d7168c

Browse files
[Fuchsia] Providing FUCHSIA_SDK_PATH env var for fuchsia lsc (#51234)
This change updates test-scripts with https://crrev.com/c/5347216 so that it can override the sdk location from an env var. The override location can be used by update_product_bundles to download emulator images of an unreleased sdk from gcs buckets. The process is used by fuchsia lsc (https://ci.chromium.org/ui/p/turquoise/builders/global.ci/sdk-core-linux-flutter), now it's failing due to the wrong product_bundle location being used. This change should have no impact to the existing builders since they do not use either gclient variables relevant. E.g. download_fuchsia_sdk and fuchsia_sdk_path. Bug: http://b/328110079 FYI: @mbrase [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent 545fad8 commit 6d7168c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

DEPS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ vars = {
257257
# The version / instance id of the cipd:chromium/fuchsia/test-scripts which
258258
# will be used altogether with fuchsia-sdk to setup the build / test
259259
# environment.
260-
'fuchsia_test_scripts_version': 'vf8imeAzGv_gjYQDoqub2laI-6nkB3gQNiGuVaFForMC',
260+
'fuchsia_test_scripts_version': 'XtkBHdNTtIpWdxN_lUNf6VqnvPUhvGTYgPDqob1R65EC',
261261

262262
# The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be
263263
# used altogether with fuchsia-sdk to generate gn based build rules.
@@ -1205,6 +1205,9 @@ hooks = [
12051205
'pattern': '.',
12061206
'condition': 'run_fuchsia_emu',
12071207
'action': [
1208+
'env',
1209+
'DOWNLOAD_FUCHSIA_SDK={download_fuchsia_sdk}',
1210+
'FUCHSIA_SDK_PATH={fuchsia_sdk_path}',
12081211
'python3',
12091212
'src/flutter/tools/fuchsia/with_envs.py',
12101213
'src/flutter/tools/fuchsia/test_scripts/update_product_bundles.py',

tools/fuchsia/with_envs.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ def Main():
3030
assert platform.system() == 'Linux', 'Unsupported OS ' + platform.system()
3131
os.environ['FUCHSIA_SDK_ROOT'] = os.path.join(os.environ['SRC_ROOT'], 'fuchsia/sdk/linux/')
3232

33+
if os.getenv('DOWNLOAD_FUCHSIA_SDK') == 'True':
34+
sdk_path = os.environ['FUCHSIA_SDK_PATH']
35+
assert sdk_path.endswith('/linux-amd64/core.tar.gz')
36+
assert not sdk_path.startswith('/')
37+
os.environ['FUCHSIA_SDK_OVERRIDE'
38+
] = 'gs://fuchsia-artifacts/' + sdk_path[:-len('/linux-amd64/core.tar.gz')]
39+
3340
with subprocess.Popen(sys.argv[1:]) as proc:
3441
try:
3542
proc.wait()

0 commit comments

Comments
 (0)