tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 543f25fd74fe934a83b5f5cc70102d6d7fd739c2
parent 73ea9a3bfaabd718ec40533f23d8dd8e53b017c9
Author: Mukilan Thiyagarajan <mukilan@igalia.com>
Date:   Sun, 26 Oct 2025 21:12:28 +0000

Bug 1995469 [wpt PR 55566] - tools: update download URL schema for Servo nightly, a=testonly

Automatic update from web-platform-tests
tools: update download URL schema for Servo nightly

Servo has adopted a new URL schema for its nightly builds that includes
the platform/toolchain names.

Update the corresponding download & install logic in wpt to use this new
schema as the old one will be discontinued soon.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

--

wpt-commits: 75fe081bfb9159fe8c3c2a4e474da45677a374b4
wpt-pr: 55566

Diffstat:
Mtesting/web-platform/tests/tools/wpt/browser.py | 28+++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/testing/web-platform/tests/tools/wpt/browser.py b/testing/web-platform/tests/tools/wpt/browser.py @@ -2271,11 +2271,12 @@ class Servo(Browser): requirements = None def platform_components(self): - platform = { - "Linux": "linux", - "Windows": "win", - "Darwin": "mac" - }.get(uname[0]) + platform, triple = { + ("Darwin", "arm64"): ("mac-arm64", "aarch64-apple-darwin"), + ("Darwin", "x86_64"): ("mac", "x86_64-apple-darwin"), + ("Linux", "x86_64"): ("linux", "x86_64-linux-gnu"), + ("Windows", "AMD64"): ("win", "x86_64-windows-msvc"), + }.get((uname[0], uname[4]), (None, None)) if platform is None: raise ValueError("Unable to construct a valid Servo package for current platform") @@ -2283,27 +2284,28 @@ class Servo(Browser): if platform == "linux": extension = ".tar.gz" decompress = untar - elif platform == "win" or platform == "mac": + elif platform in ["win", "mac", "mac-arm64"]: raise ValueError("Unable to construct a valid Servo package for current platform") - return (platform, extension, decompress) + default_filename = f"servo-{triple}" + return (platform, default_filename, extension, decompress) def _get(self, channel="nightly"): if channel != "nightly": raise ValueError("Only nightly versions of Servo are available") - platform, extension, _ = self.platform_components() - url = "https://download.servo.org/nightly/%s/servo-latest%s" % (platform, extension) - return get(url) + platform, filename, extension, _ = self.platform_components() + artifact = f"{filename}{extension}" + return get(f"https://download.servo.org/nightly/{platform}/{artifact}") def download(self, dest=None, channel="nightly", rename=None): if dest is None: dest = os.pwd resp = self._get(dest, channel) - _, extension, _ = self.platform_components() + _, default_filename, extension, _ = self.platform_components() - filename = rename if rename is not None else "servo-latest" + filename = rename if rename is not None else default_filename with open(os.path.join(dest, "%s%s" % (filename, extension,)), "w") as f: f.write(resp.content) @@ -2312,7 +2314,7 @@ class Servo(Browser): if dest is None: dest = os.pwd - _, _, decompress = self.platform_components() + _, _, _, decompress = self.platform_components() resp = self._get(channel) decompress(resp.raw, dest=dest)