Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch_configs: add xz extension for linux archives (bug 1931405) #1877

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mozregression/fetch_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get_build_regex(
else:
platform = r"win32"
elif os == "linux":
ext = r"\.tar.bz2"
ext = r"\.tar.(bz2|xz)"
if arch == "aarch64":
platform = r"linux-aarch64"
elif arch == "x86_64":
Expand Down
12 changes: 8 additions & 4 deletions tests/unit/test_fetch_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ class TestFirefoxConfigLinux32(TestFirefoxConfigLinux64):
build_info_examples = ["firefox-38.0a1.en-US.linux-i686.txt"]


class TestFirefoxConfigLinux64xz(TestFirefoxConfigLinux64):
build_examples = ["firefox-38.0a1.en-US.linux-x86_64.tar.xz"]


class TestFirefoxConfigWin64(TestFirefoxConfigLinux64):
os = "win"
build_examples = [
Expand Down Expand Up @@ -311,12 +315,12 @@ class TestGetBuildUrl(unittest.TestCase):
def test_for_linux(self):
self.assertEqual(
get_build_regex("test", "linux", 32, "x86"),
r"(target|test.*linux-i686)\.tar.bz2",
r"(target|test.*linux-i686)\.tar.(bz2|xz)",
)

self.assertEqual(
get_build_regex("test", "linux", 64, "x86_64"),
r"(target|test.*linux-x86_64)\.tar.bz2",
r"(target|test.*linux-x86_64)\.tar.(bz2|xz)",
)

self.assertEqual(
Expand All @@ -325,11 +329,11 @@ def test_for_linux(self):
)
self.assertEqual(
get_build_regex("test", "linux", 64, "x86_64", arch="x86"),
r"(target|test.*linux-i686)\.tar.bz2",
r"(target|test.*linux-i686)\.tar.(bz2|xz)",
)
self.assertEqual(
get_build_regex("test", "linux", 64, "aarch64"),
r"(target|test.*linux-aarch64)\.tar.bz2",
r"(target|test.*linux-aarch64)\.tar.(bz2|xz)",
)

def test_for_win(self):
Expand Down