Bug 922517 - fix O(tests * support-files) behaviour in _process_test_manifest, r=gps

This commit is contained in:
Ziga Seilnacht 2013-10-22 15:17:00 -07:00
Родитель ea1aa8d95a
Коммит 5bf0224313
1 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -278,17 +278,28 @@ class TreeMetadataEmitter(LoggingMixin):
finder = FileFinder(base=manifest_dir, find_executables=False)
# "head" and "tail" lists.
# All manifests support support-files.
#
# Keep a set of already seen support file patterns, because
# repeatedly processing the patterns from the default section
# for every test is quite costly (see bug 922517).
extras = (('head', set()),
('tail', set()),
('support-files', set()))
for test in filtered:
obj.tests.append(test)
obj.installs[mozpath.normpath(test['path'])] = \
mozpath.join(out_dir, test['relpath'])
# xpcshell defines extra files to install in the
# "head" and "tail" lists.
# All manifests support support-files.
for thing in ('head', 'tail', 'support-files'):
for pattern in test.get(thing, '').split():
for thing, seen in extras:
value = test.get(thing, '')
if value in seen:
continue
seen.add(value)
for pattern in value.split():
# We only support globbing on support-files because
# the harness doesn't support * for head and tail.
#