bug 1471281: toolkit: make building geckodriver mandatory; r=froydnj
authorAndreas Tolfsen <ato@sny.no>
Wed, 22 Aug 2018 17:26:10 +0100
changeset 491415 3a859a6f0720e3841d44721414e2c9f8a099048c
parent 491414 c8ee11194f694700a00a726e92411637ebed84fe
child 491416 3b6c97dfb586c91ac08d2c4b2d33e17962e43164
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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).
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -897,49 +897,38 @@ option('--enable-marionette',
 def marionette(value):
     if value:
         return True
 set_config('ENABLE_MARIONETTE', marionette)
 # geckodriver WebDriver implementation
 # ==============================================================
-option('--enable-geckodriver', help='Enable WebDriver implementation')
-         '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.
+# 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.
-    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.")
+@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
+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
 # ========================================================
 def webrtc_default(target):
     # Turn off webrtc for OS's we don't handle yet, but allow
     # --enable-webrtc to override.