Bug 1535501 - Allow to get full crashreporter symbols on artifact builds. r=mshal

Differential Revision: https://phabricator.services.mozilla.com/D23605

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2019-03-15 21:56:14 +00:00
Родитель 3e480d411d
Коммит c7e738d69d
5 изменённых файлов: 21 добавлений и 5 удалений

Просмотреть файл

@ -168,7 +168,7 @@ endif
# enable --host-bins only for automation builds, which only require Linux and
# Windows host binaries.
recurse_artifact:
$(topsrcdir)/mach --log-no-times artifact install$(if $(MOZ_ARTIFACT_BUILD_SYMBOLS), --symbols)$(if $(MOZ_AUTOMATION), --host-bins)
$(topsrcdir)/mach --log-no-times artifact install$(if $(MOZ_ARTIFACT_BUILD_SYMBOLS), --symbols$(addprefix =,$(filter full,$(MOZ_ARTIFACT_BUILD_SYMBOLS))))$(if $(MOZ_AUTOMATION), --host-bins)
ifdef MOZ_EME_WIN32_ARTIFACT
recurse_win32-artifact:

Просмотреть файл

@ -28,11 +28,12 @@ imply_option('--enable-artifact-build-symbols',
depends(artifact_builds)(lambda v: False if v is None else None),
reason='--disable-artifact-builds')
option('--enable-artifact-build-symbols',
option('--enable-artifact-build-symbols', nargs='?', choices=('full',),
help='Download symbols when artifact builds are enabled.')
set_config('MOZ_ARTIFACT_BUILD_SYMBOLS',
depends_if('--enable-artifact-build-symbols')(lambda _: True))
depends('--enable-artifact-build-symbols')(
lambda v: v[0] if len(v) else (bool(v) or None)))
@depends('--enable-artifact-builds')
def imply_disable_compile_environment(value):

Просмотреть файл

@ -163,7 +163,9 @@ class ArtifactJob(object):
self._log = log
self._substs = substs
self._symbols_archive_suffix = None
if download_symbols:
if download_symbols == 'full':
self._symbols_archive_suffix = 'crashreporter-symbols-full.zip'
elif download_symbols:
self._symbols_archive_suffix = 'crashreporter-symbols.zip'
def log(self, *args, **kwargs):

Просмотреть файл

@ -1211,6 +1211,14 @@ class ArtifactSubCommand(SubCommand):
return after
class SymbolsAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
# If this function is called, it means the --symbols option was given,
# so we want to store the value `True` if no explicit value was given
# to the option.
setattr(namespace, self.dest, values or True)
@CommandProvider
class PackageFrontend(MachCommandBase):
"""Fetch and install binary artifacts from Mozilla automation."""
@ -1266,7 +1274,7 @@ class PackageFrontend(MachCommandBase):
help='Skip all local caches to force re-fetching remote artifacts.',
default=False)
@CommandArgument('--no-tests', action='store_true', help="Don't install tests.")
@CommandArgument('--symbols', action='store_true', help='Download symbols.')
@CommandArgument('--symbols', nargs='?', action=SymbolsAction, help='Download symbols.')
@CommandArgument('--host-bins', action='store_true', help='Download host binaries.')
@CommandArgument('--distdir', help='Where to install artifacts to.')
def artifact_install(self, source=None, skip_cache=False, tree=None, job=None, verbose=False,

Просмотреть файл

@ -53,6 +53,11 @@ ifdef MOZ_ARTIFACT_BUILD_SYMBOLS
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
cd $(DIST)/crashreporter-symbols && \
zip -r5D '../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' . -i '*.sym' -i '*.txt'
ifeq ($(MOZ_ARTIFACT_BUILD_SYMBOLS),full)
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
cd $(DIST)/crashreporter-symbols && \
zip -r5D '../$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' .
endif
endif # MOZ_ARTIFACT_BUILD_SYMBOLS
ifdef MOZ_CODE_COVERAGE
@echo 'Generating chrome-map for coverage data...'