diff --git a/docs/documentation/usage.md b/docs/documentation/usage.md
index 577d92d7f..1af4044ae 100644
--- a/docs/documentation/usage.md
+++ b/docs/documentation/usage.md
@@ -90,6 +90,10 @@ to date list of available options.
mozregression --repo mozilla-aurora
+- Bisecting from a ESR branch
+
+ mozregression --repo esr140
+
- Bisecting inbound directly
mozregression --good 8850aa0f --bad 2a193b7f
diff --git a/gui/mozregui/ui/intro.ui b/gui/mozregui/ui/intro.ui
index 13a189e32..282f6db76 100644
--- a/gui/mozregui/ui/intro.ui
+++ b/gui/mozregui/ui/intro.ui
@@ -60,6 +60,16 @@
Choose a build type you want.
+
+ -
+
+
+ Hint: To choose an ESR branch, select target app and enter esrXXX.
+
+
+ color: gray; font-size: 10px;
+
+
-
@@ -81,7 +91,7 @@
- -
+
-
enter the code of the lang you want a build for
@@ -91,7 +101,7 @@
- -
+
-
Lang code such as he, ar, zh-TW
@@ -101,7 +111,7 @@
- -
+
-
enter a URL to pass to the app
@@ -111,7 +121,7 @@
- -
+
-
URL such as example.org, https://mozilla.org, about:logo
diff --git a/mozregression/branches.py b/mozregression/branches.py
index 976cb4e60..7a334d660 100644
--- a/mozregression/branches.py
+++ b/mozregression/branches.py
@@ -12,6 +12,7 @@
from mozregression.errors import MozRegressionError
LOG = get_proxy_logger("Branches")
+RE_ESR = re.compile(r"^(?:(mozilla-|comm-))?esr(\d+)$", re.I)
class Branches(object):
@@ -38,12 +39,24 @@ def set_alias(self, alias, branch_name):
self._aliases[alias] = branch_name
def get_url(self, branch_name_or_alias):
+ name = self.get_name(branch_name_or_alias)
try:
- return self._branches[self.get_name(branch_name_or_alias)]
+ return self._branches[name]
except KeyError:
+ if RE_ESR.match(name):
+ url = self.DEFAULT_REPO_URL + "releases/%s" % name
+ return url
raise MozRegressionError("No such branch '%s'." % branch_name_or_alias)
def get_name(self, branch_name_or_alias):
+ if branch_name_or_alias:
+ match = RE_ESR.match(branch_name_or_alias)
+ if match:
+ prefix = match.group(1)
+ if prefix:
+ return "%sesr%s" % (prefix, match.group(2))
+ else:
+ return "esr%s" % match.group(2)
return self._aliases.get(branch_name_or_alias) or branch_name_or_alias
def get_category(self, branch_name_or_alias):
@@ -51,6 +64,8 @@ def get_category(self, branch_name_or_alias):
for cat, names in self._categories.items():
if name in names:
return cat
+ if name and RE_ESR.match(name):
+ return "releases"
def create_branches():
diff --git a/mozregression/fetch_configs.py b/mozregression/fetch_configs.py
index 9e1bb16fb..14862ffa4 100644
--- a/mozregression/fetch_configs.py
+++ b/mozregression/fetch_configs.py
@@ -238,7 +238,20 @@ def set_repo(self, repo):
If not set or set to None, default repos would be used (see
:meth:`get_nightly_repo` and :attr:`integration_branch`)
"""
- self.repo = branches.get_name(repo) if repo else None
+ if repo:
+ name = branches.get_name(repo)
+ is_esr = name.startswith("esr")
+ if self.app_name == "thunderbird" and is_esr:
+ self.repo = "comm-" + name
+ elif self.app_name == "firefox" and is_esr:
+ self.repo = "mozilla-" + name
+ elif is_esr:
+ # A bare `esr` defaults to the Firefox (`mozilla`) repository.
+ self.repo = "mozilla-" + name
+ else:
+ self.repo = name
+ else:
+ self.repo = None
def should_use_archive(self):
"""
@@ -559,11 +572,17 @@ class ThunderbirdIntegrationConfigMixin(IntegrationConfigMixin):
def tk_routes(self, push):
for build_type in self.build_types:
- yield "comm.v2.{}.revision.{}.thunderbird.{}-{}".format(
+ yield "comm.v2.{}{}.revision.{}.thunderbird.{}-{}".format(
self.integration_branch,
+ (
+ ".shippable"
+ if self.integration_branch != "comm-central"
+ or (self.integration_branch == "comm-central" and build_type == "shippable")
+ else ""
+ ),
push.changeset,
_common_tk_part(self),
- build_type,
+ "opt",
)
self._inc_used_build()
return
@@ -675,6 +694,15 @@ def available_archs(self):
class ThunderbirdConfig(
CommonConfig, ThunderbirdNightlyConfigMixin, ThunderbirdIntegrationConfigMixin
):
+ BUILD_TYPES = (
+ "shippable",
+ "opt",
+ )
+ BUILD_TYPE_FALLBACKS = {
+ "shippable": ("opt",),
+ "opt": ("shippable",),
+ }
+
pass
diff --git a/tests/unit/test_branches.py b/tests/unit/test_branches.py
index cade541c3..c72d4809e 100644
--- a/tests/unit/test_branches.py
+++ b/tests/unit/test_branches.py
@@ -13,6 +13,7 @@
("mozilla-central", "mozilla-central"),
("mozilla-central", "m-c"),
("unknown", "unknown"),
+ ("mozilla-esr140", "mozilla-esr140"),
],
)
def test_branch_name(branch, alias):
@@ -25,6 +26,7 @@ def test_branch_name(branch, alias):
("m-c", "https://hg.mozilla.org/mozilla-central"),
("m-i", "https://hg.mozilla.org/integration/mozilla-inbound"),
("mozilla-beta", "https://hg.mozilla.org/releases/mozilla-beta"),
+ ("mozilla-esr140", "https://hg.mozilla.org/releases/mozilla-esr140"),
],
)
def test_get_urls(branch, url):
@@ -63,6 +65,9 @@ def test_get_url_unknown_branch():
("mozilla-beta", "releases"),
("", None),
(None, None),
+ ("mozilla-esr140", "releases"),
+ ("esr140", "releases"),
+ ("comm-esr140", "releases"),
],
)
def test_get_category(name, expected):
diff --git a/tests/unit/test_fetch_configs.py b/tests/unit/test_fetch_configs.py
index bb0c50b14..b572eefeb 100644
--- a/tests/unit/test_fetch_configs.py
+++ b/tests/unit/test_fetch_configs.py
@@ -518,7 +518,7 @@ def test_aarch64_build_types(self):
"x86_64",
"comm-beta",
TIMESTAMP_TEST,
- "comm.v2.comm-beta.revision.%s.thunderbird.linux64-opt" % CHSET,
+ "comm.v2.comm-beta.shippable.revision.%s.thunderbird.linux64-opt" % CHSET,
),
],
)
@@ -566,6 +566,15 @@ def test_tk_route(app, os, bits, processor, repo, push_date, expected):
"shippable",
"gecko.v2.mozilla-central.shippable.revision.%s.mobile.android-api-16-opt" % CHSET,
),
+ # thunderbird
+ (
+ "thunderbird",
+ "win",
+ 32,
+ "x86_64",
+ "shippable",
+ "comm.v2.comm-central.shippable.revision.%s.thunderbird.win32-opt" % CHSET,
+ ),
],
)
def test_tk_route_with_build_type(app, os, bits, processor, build_type, expected):