Bug 1028226 - Clean up the code for manifest parsing. r=jmaher

This commit is contained in:
Vaibhav Agrawal 2014-07-10 09:38:00 +02:00
Родитель b5ac94c24d
Коммит 616e4c5a42
1 изменённых файлов: 2 добавлений и 14 удалений

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

@ -1864,26 +1864,14 @@ class Mochitest(MochitestUtilsMixin):
"""
Make the list of directories by parsing manifests
"""
info = {}
for k, v in mozinfo.info.items():
if isinstance(k, unicode):
k = k.encode('ascii')
info[k] = v
tests = self.getActiveTests(options, False)
dirlist = []
manifest = self.getTestManifest(options)
tests = manifest.active_tests(disabled=False, options=options, **info)
for test in tests:
pathAbs = os.path.abspath(test['path'])
assert pathAbs.startswith(self.testRootAbs)
tp = pathAbs[len(self.testRootAbs):].replace('\\', '/').strip('/')
rootdir = '/'.join(tp.split('/')[:-1])
rootdir = '/'.join(test['path'].split('/')[:-1])
if rootdir not in dirlist:
dirlist.append(rootdir)
dirlist.sort()
return dirlist
def main():