Bug 1256571 - Allow ConfigureSandbox.run to not include a given file. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 13 Apr 2016 08:57:45 +0900
changeset 330988 02561278899ca2262e62fe7060cb24e0a80f9293
parent 330987 2916126df6689dc379b1b7c3a55fc236932a9a2d
child 330989 25f299dca206e35c03b99a3fdac12b6482dc90c0
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1256571
milestone48.0a1
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 1256571 - Allow ConfigureSandbox.run to not include a given file. r=chmanchester
python/mozbuild/mozbuild/configure/__init__.py
--- a/python/mozbuild/mozbuild/configure/__init__.py
+++ b/python/mozbuild/mozbuild/configure/__init__.py
@@ -191,20 +191,21 @@ class ConfigureSandbox(dict):
         source = open(path, 'rb').read()
 
         code = compile(source, path, 'exec')
 
         exec(code, self)
 
         self._paths.pop(-1)
 
-    def run(self, path):
+    def run(self, path=None):
         '''Executes the given file within the sandbox, and ensure the overall
         consistency of the executed script.'''
-        self.include_file(path)
+        if path:
+            self.include_file(path)
 
         for option in self._options.itervalues():
             # All options must be referenced by some @depends function
             if option not in self._seen:
                 raise ConfigureError(
                     'Option `%s` is not handled ; reference it with a @depends'
                     % option.option
                 )