mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 991983 - Emit absolute paths for UnifiedSources. r=gps
This helps upcoming changes, and relieves backends from path resolution. This has the side effect of chaning the order of some unified sources, which consequently breaks nsTextFormatter because it declares snprintf methods after nsStringAPI #defines it.
This commit is contained in:
parent
16049d00ac
commit
bebcacabda
@ -779,6 +779,9 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
# Now sort the files to let groupby work.
|
||||
sorted_files = sorted(context[variable], key=canonical_suffix_for_file)
|
||||
for canonical_suffix, files in itertools.groupby(sorted_files, canonical_suffix_for_file):
|
||||
if variable.startswith('UNIFIED_'):
|
||||
files = [mozpath.normpath(mozpath.join(context.srcdir, f))
|
||||
for f in files]
|
||||
arglist = [context, list(files), canonical_suffix]
|
||||
if variable.startswith('UNIFIED_') and 'FILES_PER_UNIFIED_FILE' in context:
|
||||
arglist.append(context['FILES_PER_UNIFIED_FILE'])
|
||||
|
@ -818,7 +818,9 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
}
|
||||
for suffix, files in expected.items():
|
||||
sources = suffix_map[suffix]
|
||||
self.assertEqual(sources.files, files)
|
||||
self.assertEqual(
|
||||
sources.files,
|
||||
[mozpath.join(reader.config.topsrcdir, f) for f in files])
|
||||
self.assertTrue(sources.have_unified_mapping)
|
||||
|
||||
def test_unified_sources_non_unified(self):
|
||||
@ -840,7 +842,9 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
}
|
||||
for suffix, files in expected.items():
|
||||
sources = suffix_map[suffix]
|
||||
self.assertEqual(sources.files, files)
|
||||
self.assertEqual(
|
||||
sources.files,
|
||||
[mozpath.join(reader.config.topsrcdir, f) for f in files])
|
||||
self.assertFalse(sources.have_unified_mapping)
|
||||
|
||||
def test_dist_files(self):
|
||||
|
@ -1308,3 +1308,5 @@ ParseString(const nsACString& aSource, char aDelimiter,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#undef snprintf
|
||||
|
Loading…
Reference in New Issue
Block a user