summaryrefslogtreecommitdiffstats
path: root/src/ci/docker/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /src/ci/docker/scripts
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ci/docker/scripts')
-rwxr-xr-xsrc/ci/docker/scripts/fuchsia-test-runner.py48
1 files changed, 41 insertions, 7 deletions
diff --git a/src/ci/docker/scripts/fuchsia-test-runner.py b/src/ci/docker/scripts/fuchsia-test-runner.py
index f78d446c8..437b51641 100755
--- a/src/ci/docker/scripts/fuchsia-test-runner.py
+++ b/src/ci/docker/scripts/fuchsia-test-runner.py
@@ -12,6 +12,7 @@ from dataclasses import dataclass
import fcntl
import glob
import hashlib
+import io
import json
import os
import platform
@@ -276,27 +277,60 @@ class TestEnvironment:
stderr=self.subprocess_output(),
)
- # Start emulator
- self.log_info("Starting emulator...")
- product_bundle = "terminal.qemu-" + self.triple_to_arch(self.target)
+ # Look up the product bundle transfer manifest.
+ self.log_info("Looking up the product bundle transfer manifest...")
+ product_name = "minimal." + self.triple_to_arch(self.target)
+ fuchsia_version = "14.20230811.2.1"
+
+ # FIXME: We should be able to replace this with the machine parsable
+ # `ffx --machine json product lookup ...` once F15 is released.
+ out = subprocess.check_output(
+ [
+ ffx_path,
+ "product",
+ "lookup",
+ product_name,
+ fuchsia_version,
+ "--base-url",
+ "gs://fuchsia/development/" + fuchsia_version,
+ ],
+ env=ffx_env,
+ stderr=self.subprocess_output(),
+ )
+
+ self.log_debug(out)
+
+ for line in io.BytesIO(out):
+ if line.startswith(b"gs://"):
+ transfer_manifest_url = line.rstrip()
+ break
+ else:
+ raise Exception("Unable to parse transfer manifest")
+
+ # Download the product bundle.
+ product_bundle_dir = os.path.join(self.tmp_dir(), 'product-bundle')
subprocess.check_call(
[
ffx_path,
- "product-bundle",
- "get",
- product_bundle,
+ "product",
+ "download",
+ transfer_manifest_url,
+ product_bundle_dir,
+ "--force",
],
env=ffx_env,
stdout=self.subprocess_output(),
stderr=self.subprocess_output(),
)
+
+ # Start emulator
# FIXME: condition --accel hyper on target arch matching host arch
subprocess.check_call(
[
ffx_path,
"emu",
"start",
- product_bundle,
+ product_bundle_dir,
"--headless",
"--log",
self.emulator_log_path(),