mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1134072 - Remove support for post-eval sandbox callback; r=glandium
Support for a callback to be executed post sandbox evaluation was added in 24b43ecb4cad (bug 949906) to unbust Sphinx as a result of some GYP processing changes. e93c40d4344f and bug 1071012 subsequently changed how Sphinx variables are extracted from moz.build, removing the only consumer of this feature. Since there are no consumers of this feature left, remove it and make the code simpler. --HG-- extra : rebase_source : 95bb619aba0bb00719e060a4cf346b9dd51eb541 extra : amend_source : ef195e478b122a18f89ad0b2b2b1aab4a4090e42 extra : histedit_source : 36a464ace2fe261b1315544c9ee6a23fc0ab71a2
This commit is contained in:
parent
823c0db972
commit
b183534ab4
@ -719,10 +719,9 @@ class BuildReader(object):
|
||||
each sandbox evaluation. Its return value is ignored.
|
||||
"""
|
||||
|
||||
def __init__(self, config, sandbox_post_eval_cb=None):
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
|
||||
self._sandbox_post_eval_cb = sandbox_post_eval_cb
|
||||
self._log = logging.getLogger(__name__)
|
||||
self._read_files = set()
|
||||
self._execution_stack = []
|
||||
@ -967,9 +966,6 @@ class BuildReader(object):
|
||||
sandbox.exec_file(path)
|
||||
context.execution_time = time.time() - time_start
|
||||
|
||||
if self._sandbox_post_eval_cb:
|
||||
self._sandbox_post_eval_cb(context)
|
||||
|
||||
# We first collect directories populated in variables.
|
||||
dir_vars = ['DIRS']
|
||||
|
||||
@ -1011,9 +1007,6 @@ class BuildReader(object):
|
||||
gyp_contexts.append(gyp_context)
|
||||
|
||||
for gyp_context in gyp_contexts:
|
||||
if self._sandbox_post_eval_cb:
|
||||
self._sandbox_post_eval_cb(gyp_context)
|
||||
|
||||
context['DIRS'].append(mozpath.relpath(gyp_context.objdir, context.objdir))
|
||||
|
||||
yield context
|
||||
|
@ -237,21 +237,6 @@ class TestBuildReader(unittest.TestCase):
|
||||
self.assertEqual([context['XPIDL_MODULE'] for context in contexts],
|
||||
['foobar', 'foobar', 'baz', 'foobar'])
|
||||
|
||||
def test_process_eval_callback(self):
|
||||
def strip_dirs(context):
|
||||
context['DIRS'][:] = []
|
||||
count[0] += 1
|
||||
|
||||
reader = self.reader('traversal-simple',
|
||||
sandbox_post_eval_cb=strip_dirs)
|
||||
|
||||
count = [0]
|
||||
|
||||
contexts = list(reader.read_topsrcdir())
|
||||
|
||||
self.assertEqual(len(contexts), 1)
|
||||
self.assertEqual(len(count), 1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user