зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1600530 - Consider MOZ_OBJDIR from the environment when there is no mozconfig. r=nalexander
We currently only deal with MOZ_OBJDIR in the environment when there is a mozconfig. Differential Revision: https://phabricator.services.mozilla.com/D80308
This commit is contained in:
Родитель
4c8b889f5e
Коммит
7fc03d8e13
|
@ -111,6 +111,8 @@ class MozconfigLoader(object):
|
|||
}
|
||||
|
||||
if path is None:
|
||||
if 'MOZ_OBJDIR' in os.environ:
|
||||
result['topobjdir'] = os.environ['MOZ_OBJDIR']
|
||||
return result
|
||||
|
||||
path = mozpath.normsep(path)
|
||||
|
|
|
@ -113,6 +113,11 @@ class TestMozconfigLoader(unittest.TestCase):
|
|||
self.assertEqual(result['make_flags'], ['-j8', '-s'])
|
||||
self.assertEqual(result['make_extra'], ['FOO=BAR BAZ', 'BIZ=1'])
|
||||
|
||||
def test_read_no_mozconfig_objdir_environ(self):
|
||||
os.environ['MOZ_OBJDIR'] = 'obj-firefox'
|
||||
result = self.get_loader().read_mozconfig()
|
||||
self.assertEqual(result['topobjdir'], 'obj-firefox')
|
||||
|
||||
def test_read_empty_mozconfig_objdir_environ(self):
|
||||
os.environ['MOZ_OBJDIR'] = 'obj-firefox'
|
||||
with NamedTemporaryFile(mode='w') as mozconfig:
|
||||
|
|
Загрузка…
Ссылка в новой задаче