Bug 1368035 - Enable geckodriver building in automation; r=ted

geckodriver compilation was disabled by default in
https://bugzilla.mozilla.org/show_bug.cgi?id=1368084 due to issues
building it locally on Windows.

This re-enables building of geckodriver in automation, but gives
developers an option, --enable-geckodriver, to opt-in to building
it locally.

geckodriver is implied on supported platforms when MOZ_AUTOMATION is
set, but we also provide the option for developers to use.  This means
geckodriver will be built in CI by default, but not in developers'
local environments.

MozReview-Commit-ID: ACkO97ekVsi

--HG--
extra : rebase_source : 067e25911f72d80a54e662f24cc71dedde53a4e1
This commit is contained in:
Andreas Tolfsen 2017-05-27 18:51:40 +01:00
Родитель b082609c14
Коммит e721ebada1
3 изменённых файлов: 46 добавлений и 24 удалений

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

@ -140,9 +140,6 @@ def sccache_verbose_stats(using_sccache, verbose_stats):
set_config('SCCACHE_VERBOSE_STATS', sccache_verbose_stats)
option(env='MOZ_HAZARD', help='Build for the GC rooting hazard analysis')
set_config('MOZ_HAZARD', depends_if('MOZ_HAZARD')(lambda _: True))
@depends('--with-compiler-wrapper', ccache)
@imports(_from='mozbuild.shellutil', _import='split', _as='shell_split')
def compiler_wrapper(wrapper, ccache):
@ -172,6 +169,18 @@ def using_compiler_wrapper(compiler_wrapper):
set_config('MOZ_USING_COMPILER_WRAPPER', using_compiler_wrapper)
# GC rooting and hazard analysis.
# ==============================================================
option(env='MOZ_HAZARD', help='Build for the GC rooting hazard analysis')
@depends('MOZ_HAZARD')
def hazard_analysis(value):
if value:
return True
set_config('MOZ_HAZARD', hazard_analysis)
# Cross-compilation related things.
# ==============================================================
js_option('--with-toolchain-prefix', env='TOOLCHAIN_PREFIX', nargs=1,

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

@ -1090,3 +1090,35 @@ def marionette(value):
return True
set_config('ENABLE_MARIONETTE', marionette)
# geckodriver WebDriver implementation
# ==============================================================
option('--enable-geckodriver', help='Enable WebDriver implementation')
@depends('--enable-geckodriver',
'MOZ_AUTOMATION',
compile_environment,
cross_compiling,
hazard_analysis,
target)
def geckodriver(enable, automation, compile_env, cross_compile, hazard, target):
"""
geckodriver is implied on supported platforms when MOZ_AUTOMATION
is set, but we also provide the --enable-geckodriver option for
developers to use.
At the present time, we want individual developers to be able to
opt-in to building geckodriver locally, and for it to be enabled by
default on supported CI build platforms.
"""
if enable:
return True
if enable.origin == 'default':
linux32 = target.kernel == 'Linux' and target.cpu == 'x86'
broken_platforms = cross_compile or linux32 or hazard
if automation and compile_env and not broken_platforms:
return True
set_config('ENABLE_GECKODRIVER', geckodriver)

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

@ -154,27 +154,8 @@ if CONFIG['ENABLE_MARIONETTE']:
'/testing/marionette',
]
"""
Temporarily disable building ../testing/geckodriver
until https://bugzilla.mozilla.org/show_bug.cgi?id=1368035,
letting local developer builds opt in with --enable-geckodriver is fixed.
# Disable building of geckodriver for artifact builds and in
# environments where cross compiling occurs (macOS and Android),
# on hazard builds, and on Linux x86 (linking problems).
#
# https://bugzilla.mozilla.org/show_bug.cgi?id=1341041
# https://bugzilla.mozilla.org/show_bug.cgi?id=1329737
# https://bugzilla.mozilla.org/show_bug.cgi?id=1367519
# https://bugzilla.mozilla.org/show_bug.cgi?id=1367736
if (not CONFIG['COMPILE_ENVIRONMENT'] or
CONFIG['CROSS_COMPILE'] or
(CONFIG['OS_TARGET'] == 'Linux' and CONFIG['TARGET_CPU'] == 'i686') or
CONFIG['MOZ_HAZARD']):
pass
else:
DIRS += ['/testing/geckodriver']
"""
if CONFIG['ENABLE_GECKODRIVER']:
DIRS += ['/testing/geckodriver']
DIRS += [
'/tools/quitter',