Skip to content

Commit

Permalink
fetch_configs: add xz extension for linux archives (bug 1931405) (#1877)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzeid authored Nov 14, 2024
1 parent 5334732 commit 84fe14e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
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

0 comments on commit 84fe14e

Please sign in to comment.