Bug 1028226 - Clean up the code for manifest parsing. r=jmaher
authorVaibhav Agrawal <vaibhavmagarwal@gmail.com>
Thu, 10 Jul 2014 09:38:00 +0200
changeset 215686 98dffc10c25c5d2c3b01862eef1900cedb22e192
parent 215685 fc19e46ce305cd678ec628997330d7f2a64688ee
child 215687 665539a1bbb3f7648209ae10a216358f5747f7c4
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1028226
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1028226 - Clean up the code for manifest parsing. r=jmaher
testing/mochitest/runtests.py
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1859,36 +1859,24 @@ class Mochitest(MochitestUtilsMixin):
         manifest = TestManifest([masterPath], strict=False)
 
     return manifest
 
   def getDirectories(self, options):
     """
         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():
 
   # parse command line options
   mochitest = Mochitest()
   parser = MochitestOptions()
   options, args = parser.parse_args()