зеркало из https://github.com/mozilla/gecko-dev.git
bug 1471281: toolkit: make building geckodriver mandatory; r=froydnj
Enable building of geckodriver by default where we have a compile environment available. This makes --enable-geckodriver unavailable to artifact builds. Following this change: * --enable-geckodriver is implied in supported build configurations, but may be used in unsupported build configurations (Android, cross compiled, and hazard builds) to force geckodriver to be built. * --disable-geckodriver causes geckodriver not to be built. * In artifact build mode, a geckodriver binary artifact will continue to be downloaded, but it will not be possible to specify --enable-geckodriver without a compile environment. * --disable-tests will imply not building geckodriver, but can be overridden using --enable-geckodriver as indicated above. geckodriver remains disabled by default on cross compile builds and hazard builds, pointing out Android specifically (although it is cross compiled).
This commit is contained in:
Родитель
07dcb317a5
Коммит
95641b9fb4
|
@ -902,39 +902,28 @@ set_config('ENABLE_MARIONETTE', marionette)
|
|||
|
||||
# geckodriver WebDriver implementation
|
||||
# ==============================================================
|
||||
option('--enable-geckodriver', help='Enable WebDriver implementation')
|
||||
#
|
||||
# Turn off geckodriver for build configs we don't handle yet,
|
||||
# but allow --enable-geckodriver to override when compile environment is available.
|
||||
# --disable-tests implies disabling geckodriver.
|
||||
|
||||
@depends('--enable-geckodriver',
|
||||
'MOZ_AUTOMATION',
|
||||
compile_environment,
|
||||
target,
|
||||
cross_compiling,
|
||||
hazard_analysis,
|
||||
asan)
|
||||
def geckodriver(enable, automation, compile_env, target, cross_compile, hazard, asan):
|
||||
"""
|
||||
geckodriver is implied on supported platforms when MOZ_AUTOMATION
|
||||
is set, but we also provide the --enable-geckodriver option for
|
||||
developers to use.
|
||||
@depends('--enable-tests', target, cross_compiling, hazard_analysis, asan)
|
||||
def geckodriver_default(enable_tests, target, cross_compile, hazard, asan):
|
||||
if not enable_tests:
|
||||
return False
|
||||
if hazard or target.os == 'Android' or (asan and cross_compile):
|
||||
return False
|
||||
return True
|
||||
|
||||
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:
|
||||
if not compile_env:
|
||||
die("--enable-geckodriver is not available without a compile "
|
||||
"environment. A geckodriver binary will be downloaded during "
|
||||
"an artifact build by default where available.")
|
||||
option('--enable-geckodriver', default=geckodriver_default,
|
||||
when='--enable-compile-environment',
|
||||
help='Build geckodriver')
|
||||
|
||||
@depends('--enable-geckodriver', when='--enable-compile-environment')
|
||||
def geckodriver(enabled):
|
||||
if enabled:
|
||||
return True
|
||||
|
||||
if enable.origin == 'default':
|
||||
# Bug 1441656 for Android.
|
||||
broken_platforms = hazard or target.os == 'Android' or (asan and cross_compile)
|
||||
|
||||
if automation and compile_env and not broken_platforms:
|
||||
return True
|
||||
|
||||
set_config('ENABLE_GECKODRIVER', geckodriver)
|
||||
|
||||
# WebRTC
|
||||
|
|
Загрузка…
Ссылка в новой задаче