mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 837846 - Fix MOZ_MAKE_FLAGS handling for client.mk. r=mshal
After bug 762358 mk_add_options MOZ_MAKE_FLAGS was simply ignored in client.mk processing. At the same time, mach environment was expecting a list of options while the mozconfig reader returned a single string, so straighten this up at the same time.
This commit is contained in:
parent
aae5ca6afd
commit
00f2cd8287
@ -1117,6 +1117,8 @@ class MachDebug(MachCommandBase):
|
||||
if self.mozconfig['make_extra']:
|
||||
for arg in self.mozconfig['make_extra']:
|
||||
print(arg, file=out)
|
||||
if self.mozconfig['make_flags']:
|
||||
print('MOZ_MAKE_FLAGS=%s' % ' '.join(self.mozconfig['make_flags']))
|
||||
objdir = mozpath.normsep(self.topobjdir)
|
||||
print('MOZ_OBJDIR=%s' % objdir, file=out)
|
||||
if 'MOZ_CURRENT_PROJECT' in os.environ:
|
||||
|
@ -301,7 +301,7 @@ class MozconfigLoader(ProcessExecutionMixin):
|
||||
name, value = match.group('var'), match.group('value')
|
||||
|
||||
if name == 'MOZ_MAKE_FLAGS':
|
||||
result['make_flags'] = value
|
||||
result['make_flags'] = value.split()
|
||||
continue
|
||||
|
||||
if name == 'MOZ_OBJDIR':
|
||||
|
@ -309,14 +309,14 @@ class TestMozconfigLoader(unittest.TestCase):
|
||||
"""Ensures mk_add_options calls are captured."""
|
||||
with NamedTemporaryFile(mode='w') as mozconfig:
|
||||
mozconfig.write('mk_add_options MOZ_OBJDIR=/foo/bar\n')
|
||||
mozconfig.write('mk_add_options MOZ_MAKE_FLAGS=-j8\n')
|
||||
mozconfig.write('mk_add_options MOZ_MAKE_FLAGS="-j8 -s"\n')
|
||||
mozconfig.write('mk_add_options FOO="BAR BAZ"\n')
|
||||
mozconfig.write('mk_add_options BIZ=1\n')
|
||||
mozconfig.flush()
|
||||
|
||||
result = self.get_loader().read_mozconfig(mozconfig.name)
|
||||
self.assertEqual(result['topobjdir'], '/foo/bar')
|
||||
self.assertEqual(result['make_flags'], '-j8')
|
||||
self.assertEqual(result['make_flags'], ['-j8', '-s'])
|
||||
self.assertEqual(result['make_extra'], ['FOO=BAR BAZ', 'BIZ=1'])
|
||||
|
||||
def test_read_empty_mozconfig_objdir_environ(self):
|
||||
|
Loading…
Reference in New Issue
Block a user