diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py index 6590dc2bcc3e..f2e698aa6f5b 100644 --- a/python/mozbuild/mozbuild/configure/__init__.py +++ b/python/mozbuild/mozbuild/configure/__init__.py @@ -169,9 +169,9 @@ class ConfigureSandbox(dict): handler.setFormatter(formatter) logger.addHandler(handler) - def exec_file(self, path): - '''Execute one file within the sandbox. Users of this class probably - want to use `run` instead.''' + def include_file(self, path): + '''Include one file in the sandbox. Users of this class probably want + to use `run` instead.''' if self._paths: path = mozpath.join(mozpath.dirname(self._paths[-1]), path) @@ -199,7 +199,7 @@ class ConfigureSandbox(dict): def run(self, path): '''Executes the given file within the sandbox, and ensure the overall consistency of the executed script.''' - self.exec_file(path) + self.include_file(path) for option in self._options.itervalues(): # All options must be referenced by some @depends function @@ -434,7 +434,7 @@ class ConfigureSandbox(dict): if what: if not isinstance(what, types.StringTypes): raise TypeError("Unexpected type: '%s'" % type(what).__name__) - self.exec_file(what) + self.include_file(what) def template_impl(self, func): '''Implementation of @template. diff --git a/python/mozbuild/mozbuild/test/configure/test_checks_configure.py b/python/mozbuild/mozbuild/test/configure/test_checks_configure.py index 34486c77be2f..664713dc339e 100644 --- a/python/mozbuild/mozbuild/test/configure/test_checks_configure.py +++ b/python/mozbuild/mozbuild/test/configure/test_checks_configure.py @@ -56,7 +56,7 @@ class TestChecksConfigure(unittest.TestCase): out = StringIO() sandbox = FindProgramSandbox({}, stdout=out, stderr=out) base_dir = os.path.join(topsrcdir, 'build', 'moz.configure') - sandbox.exec_file(os.path.join(base_dir, 'checks.configure')) + sandbox.include_file(os.path.join(base_dir, 'checks.configure')) exec(textwrap.dedent(''' @checking('for a thing') @@ -158,8 +158,8 @@ class TestChecksConfigure(unittest.TestCase): out = StringIO() sandbox = FindProgramSandbox(config, environ, [prog] + args, out, out) base_dir = os.path.join(topsrcdir, 'build', 'moz.configure') - sandbox.exec_file(os.path.join(base_dir, 'util.configure')) - sandbox.exec_file(os.path.join(base_dir, 'checks.configure')) + sandbox.include_file(os.path.join(base_dir, 'util.configure')) + sandbox.include_file(os.path.join(base_dir, 'checks.configure')) status = 0 try: diff --git a/python/mozbuild/mozbuild/test/configure/test_configure.py b/python/mozbuild/mozbuild/test/configure/test_configure.py index 421f695e332e..40cbd1f80e4d 100644 --- a/python/mozbuild/mozbuild/test/configure/test_configure.py +++ b/python/mozbuild/mozbuild/test/configure/test_configure.py @@ -372,7 +372,7 @@ class TestConfigure(unittest.TestCase): out = StringIO() sandbox = ConfigureSandbox(config, {}, [], out, out) - sandbox.exec_file(mozpath.join(test_data_path, 'decorators.configure')) + sandbox.include_file(mozpath.join(test_data_path, 'decorators.configure')) self.assertNotIn('FOO', sandbox) self.assertNotIn('BAR', sandbox)