diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/mozbuild/mozbuild/backend/cpp_eclipse.py | 25 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/base.py | 5 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/config_status.py | 3 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/mach_commands.py | 10 | ||||
-rwxr-xr-x | python/mozbuild/mozbuild/mozinfo.py | 10 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/test/test_testing.py | 4 |
6 files changed, 21 insertions, 36 deletions
diff --git a/python/mozbuild/mozbuild/backend/cpp_eclipse.py b/python/mozbuild/mozbuild/backend/cpp_eclipse.py index cbdbdde8c..ae89df5b2 100644 --- a/python/mozbuild/mozbuild/backend/cpp_eclipse.py +++ b/python/mozbuild/mozbuild/backend/cpp_eclipse.py @@ -183,25 +183,12 @@ class CppEclipseBackend(CommonBackend): exe_path = os.path.join(exe_path, self._appname + self._bin_suffix) - if self.environment.substs['MOZ_WIDGET_TOOLKIT'] != 'gonk': - main_gecko_launch = os.path.join(launch_dir, 'gecko.launch') - with open(main_gecko_launch, 'wb') as fh: - launch = GECKO_LAUNCH_CONFIG_TEMPLATE - launch = launch.replace('@LAUNCH_PROGRAM@', exe_path) - launch = launch.replace('@LAUNCH_ARGS@', '-P -no-remote') - fh.write(launch) - - if self.environment.substs['MOZ_WIDGET_TOOLKIT'] == 'gonk': - b2g_flash = os.path.join(launch_dir, 'b2g-flash.launch') - with open(b2g_flash, 'wb') as fh: - # We assume that the srcdir is inside the b2g tree. - # If that's not the case the user can always adjust the path - # from the eclipse IDE. - fastxul_path = os.path.join(self.environment.topsrcdir, '..', 'scripts', 'fastxul.sh') - launch = B2GFLASH_LAUNCH_CONFIG_TEMPLATE - launch = launch.replace('@LAUNCH_PROGRAM@', fastxul_path) - launch = launch.replace('@OBJDIR@', self.environment.topobjdir) - fh.write(launch) + main_gecko_launch = os.path.join(launch_dir, 'gecko.launch') + with open(main_gecko_launch, 'wb') as fh: + launch = GECKO_LAUNCH_CONFIG_TEMPLATE + launch = launch.replace('@LAUNCH_PROGRAM@', exe_path) + launch = launch.replace('@LAUNCH_ARGS@', '-P -no-remote') + fh.write(launch) #TODO Add more launch configs (and delegate calls to mach) diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py index 9ca689009..9d5897a34 100644 --- a/python/mozbuild/mozbuild/base.py +++ b/python/mozbuild/mozbuild/base.py @@ -753,16 +753,11 @@ class MachCommandConditions(object): @staticmethod def is_b2g(cls): """Must have a B2G build.""" - if hasattr(cls, 'substs'): - return cls.substs.get('MOZ_WIDGET_TOOLKIT') == 'gonk' return False @staticmethod def is_b2g_desktop(cls): """Must have a B2G desktop build.""" - if hasattr(cls, 'substs'): - return cls.substs.get('MOZ_BUILD_APP') == 'b2g' and \ - cls.substs.get('MOZ_WIDGET_TOOLKIT') != 'gonk' return False @staticmethod diff --git a/python/mozbuild/mozbuild/config_status.py b/python/mozbuild/mozbuild/config_status.py index 343dcc3a2..3557bbf77 100644 --- a/python/mozbuild/mozbuild/config_status.py +++ b/python/mozbuild/mozbuild/config_status.py @@ -142,7 +142,8 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None, log_manager.add_terminal_logging(level=log_level) log_manager.enable_unstructured() - print('Reticulating splines...', file=sys.stderr) + print('Feeding the hatchlings...', file=sys.stderr) + sys.stderr.flush() if len(selected_backends) > 1: definitions = list(definitions) diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index f654db769..1bd5b8d34 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -541,6 +541,16 @@ class Build(MachCommandBase): # as when doing OSX Universal builds) pass + # Check if there are any unpreprocessed files in '@MOZ_OBJDIR@/dist/bin' + # See python/mozbuild/mozbuild/preprocessor.py#L293-L309 for the list of directives + # We skip if, ifdef, ifndef, else, elif, elifdef and elifndef, because they are never used alone + grepcmd = 'grep -E -r "^(#|%)(define|endif|error|expand|filter|include|literal|undef|unfilter)" '\ + + '--include=\*.{css,dtd,html,js,jsm,xhtml,xml,xul,manifest,properties,rdf} '\ + + self.topobjdir + '/dist/bin | grep -v ".css:#"' + grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0] + if grepresult: + print('\nERROR: preprocessor was not applied to the following files:\n\n' + grepresult) + return status @Command('configure', category='build', diff --git a/python/mozbuild/mozbuild/mozinfo.py b/python/mozbuild/mozbuild/mozinfo.py index 3e1d0a760..db46d7c7d 100755 --- a/python/mozbuild/mozbuild/mozinfo.py +++ b/python/mozbuild/mozbuild/mozinfo.py @@ -37,7 +37,7 @@ def build_dict(config, env=os.environ): known_os = {"Linux": "linux", "WINNT": "win", "Darwin": "mac", - "Android": "b2g" if substs.get("MOZ_WIDGET_TOOLKIT") == "gonk" else "android"} + "Android": "android"} if o in known_os: d["os"] = known_os[o] else: @@ -111,14 +111,6 @@ def build_dict(config, env=os.environ): return p - if d['buildapp'] == 'b2g': - if d['toolkit'] == 'gonk': - return 'emulator' - - if d['bits'] == 64: - return 'linux64_gecko' - return 'linux32_gecko' - if d['buildapp'] == 'mobile/android': if d['processor'] == 'x86': return 'android-x86' diff --git a/python/mozbuild/mozbuild/test/test_testing.py b/python/mozbuild/mozbuild/test/test_testing.py index e71892e24..8610edd09 100644 --- a/python/mozbuild/mozbuild/test/test_testing.py +++ b/python/mozbuild/mozbuild/test/test_testing.py @@ -80,7 +80,7 @@ ALL_TESTS = { "reason": "bug 820380", "relpath": "test_0201_app_launch_apply_update.js", "run-sequentially": "Launches application.", - "skip-if": "toolkit == 'gonk' || os == 'android'", + "skip-if": os == 'android'", "tail": "" }, { @@ -96,7 +96,7 @@ ALL_TESTS = { "reason": "bug 820380", "relpath": "test_0201_app_launch_apply_update.js", "run-sequentially": "Launches application.", - "skip-if": "toolkit == 'gonk' || os == 'android'", + "skip-if": os == 'android'", "tail": "" } ], |