diff --git a/mozregression/cli.py b/mozregression/cli.py index 8392712df..d67eb6a13 100644 --- a/mozregression/cli.py +++ b/mozregression/cli.py @@ -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( @@ -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") diff --git a/mozregression/fetch_configs.py b/mozregression/fetch_configs.py index fa91b2042..73373b3f9 100644 --- a/mozregression/fetch_configs.py +++ b/mozregression/fetch_configs.py @@ -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" @@ -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") diff --git a/mozregression/launchers.py b/mozregression/launchers.py index 735ade008..4a0fee0ca 100644 --- a/mozregression/launchers.py +++ b/mozregression/launchers.py @@ -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