Bug 1321408 - Move ENABLE_MARIONETTE to python configure. r=chmanchester

This patch tries to do three things:

1) Replace the ENABLE_MARIONETTE entrypoint with --enable-marionette.

2) Fold the default value -- forced on unless building for target OS
Android or building with toolkit gonk -- into the flag, rather than
embedding that condition in the tree.

3) Stop using AC_DEFINE and instead use only AC_SUBST, so that no
compiled code needs to be rebuilt if the flag is flipped locally.
n.b., each installer/Makefile.in knows that ENABLE_MARIONETTE is set
(in order to set -DENABLE_MARIONETTE=1 for
*/installer/package-manifest.in) due to it being an AC_SUBST.

MozReview-Commit-ID: AkkmybyP1uI

--HG--
extra : rebase_source : c2c8b268c60350ff39d872cee357b53f17e79eef
This commit is contained in:
Nick Alexander 2016-12-16 15:49:14 -08:00
Родитель 8b7d416f85
Коммит 672e74a3e1
6 изменённых файлов: 40 добавлений и 15 удалений

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

@ -58,7 +58,7 @@ The profile should be generated in a directory called 'profile'.
MARIONETTE_DISABLED = '''
The reftest command requires a marionette enabled build on Mulet.
Add 'ENABLE_MARIONETTE=1' to your mozconfig file and re-build the application.
Add 'ac_add_options --enable-marionette' to your mozconfig file and re-build the application.
Your currently active mozconfig is %s.
'''.lstrip()

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

@ -2,7 +2,7 @@
# Global options
ac_add_options --enable-debug
ENABLE_MARIONETTE=1
ac_add_options --enable-marionette
# Android
ac_add_options --with-android-min-sdk=15

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

@ -8,7 +8,7 @@ NO_NDK=1
# Global options
ac_add_options --enable-debug
ENABLE_MARIONETTE=1
ac_add_options --enable-marionette
. "$topsrcdir/mobile/android/config/mozconfigs/android-api-15/nightly"

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

@ -5231,17 +5231,6 @@ if test "$NECKO_COOKIES"; then
_NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_COOKIES"
fi
dnl
dnl Always build Marionette if not Android or B2G
dnl
if test "$OS_TARGET" != Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
AC_DEFINE(ENABLE_MARIONETTE)
fi
AC_SUBST(ENABLE_MARIONETTE)
if test "$ENABLE_MARIONETTE"; then
AC_DEFINE(ENABLE_MARIONETTE)
fi
dnl ========================================================
if test "$MOZ_DEBUG" -o "$MOZ_DMD"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=

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

@ -865,3 +865,39 @@ with only_when('--enable-compile-environment'):
set_config('LIBFUZZER', enable_libfuzzer)
set_define('LIBFUZZER', enable_libfuzzer)
# Marionette is a Web Driver / Selenium comamnd server and client automation
# driver for Mozilla's Gecko engine. For more, see
# https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette.
#
# Marionette isn't really a toolkit feature, it's a Gecko engine feature, but
# it's enabled based on the toolkit (and target), so here it lives.
@depends(target, toolkit)
def marionette_default(target, toolkit):
# By default, enable Marionette if not Android and not gonk.
#
# None means "don't set anything", which allows to override with
# --enable-marionette. False means --disable-marionette, which
# cannot be overridden with --enable-marionette. We want to allow
# overrides.
if target.os == 'Android':
return None
if toolkit == 'gonk':
return None
return True
imply_option('--enable-marionette', marionette_default,
reason='not Android and not gonk')
option('--enable-marionette',
help='Enable internal Marionette command server')
@depends('--enable-marionette')
def marionette(value):
if value:
return True
set_config('ENABLE_MARIONETTE', marionette)

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

@ -159,7 +159,7 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
DIRS += ['/addon-sdk']
if CONFIG['ENABLE_MARIONETTE'] or CONFIG['MOZ_WIDGET_TOOLKIT'] not in ('gonk', 'android'):
if CONFIG['ENABLE_MARIONETTE']:
DIRS += [
'/testing/firefox-ui',
'/testing/marionette',