Skip to content

Commit

Permalink
fetch_configs, launchers: add thunderbird-l10 support (bug 1760826)
Browse files Browse the repository at this point in the history
WORK IN PROGRESS, DO NOT MERGE.
  • Loading branch information
zzzeid committed Sep 15, 2023
1 parent 53e4eaa commit 7747328
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mozregression/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def create_parser(defaults):
parser.add_argument(
"--lang",
metavar="[ar|es-ES|he|ja|zh-CN|...]",
help=("build language. Only valid when app is firefox-l10n."),
help=("build language. Only valid when app is firefox-l10n or thunderbird-l10n."),
)

parser.add_argument(
Expand Down Expand Up @@ -565,8 +565,10 @@ def validate(self):
options.app, mozinfo.os, options.bits, mozinfo.processor, options.arch
)
if options.lang:
if options.app != "firefox-l10n":
raise MozRegressionError("--lang is only valid with --app=firefox-l10n")
if options.app not in ("firefox-l10n", "thunderbird-l10n"):
raise MozRegressionError(
"--lang is only valid with --app=firefox-l10n|thunderbird-l10n"
)
fetch_config.set_lang(options.lang)
elif options.app == "firefox-l10n":
raise MozRegressionError("app 'firefox-l10n' requires a --lang argument")
Expand Down
27 changes: 27 additions & 0 deletions mozregression/fetch_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ def _get_nightly_repo(self, date):
return "comm-central"


class ThunderbirdL10nNightlyConfigMixin(ThunderbirdNightlyConfigMixin):
has_build_info = False
def _get_nightly_repo(self, date):
return "comm-central-l10n"


class FennecNightlyConfigMixin(NightlyConfigMixin):
nightly_base_repo_name = "mobile"

Expand Down Expand Up @@ -589,6 +595,27 @@ class ThunderbirdConfig(
pass


@REGISTRY.register("thunderbird-l10n")
class ThunderbirdL10nConfig(CommonConfig, ThunderbirdL10nNightlyConfigMixin):
app_name = "thunderbird"

def set_lang(self, lang):
LOG.info("setting lang to {}".format(lang))
self.lang = lang

def build_regex(self):
return (
get_build_regex(
"thunderbird",
self.os,
self.bits,
self.processor,
platprefix=r".*\." + self.lang + r"\.",
)
+ "$"
)


@REGISTRY.register("fennec")
class FennecConfig(CommonConfig, FennecNightlyConfigMixin, FennecIntegrationConfigMixin):
BUILD_TYPES = ("shippable", "opt", "pgo", "debug")
Expand Down
5 changes: 5 additions & 0 deletions mozregression/launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,11 @@ def _install(self, dest):
self._codesign_sign(self.appdir)


@REGISTRY.register("thunderbird-l10n")
class ThunderbirdL10nLauncher(ThunderbirdLauncher):
pass


class AndroidLauncher(Launcher):
app_info = None
adb = None
Expand Down

0 comments on commit 7747328

Please sign in to comment.