Bug 608784 - update maemkit to only run with a known set of directories. r=jhford
authorJoel Maher <jmaher@mozilla.com>
Sat, 13 Nov 2010 06:05:52 -0500
changeset 21 b793afeb95d070c19539f2b9c4dc77ca3155ddbd
parent 20 ba8623e3b1812ebed2c683f08fe527dd54b3fdb2
child 22 37589d0da4fb82dd0e57e3538049209946acfa97
push id22
push userjmaher@mozilla.com
push dateSat, 13 Nov 2010 11:06:29 +0000
reviewersjhford
bugs608784
Bug 608784 - update maemkit to only run with a known set of directories. r=jhford
maemkit-maemo.cfg
maemkit.cfg
maemkit.py
mochidriver.py
--- a/maemkit-maemo.cfg
+++ b/maemkit-maemo.cfg
@@ -15,16 +15,17 @@ test-path =
 utility-path = /builds/fennec/bin
 certificate-path = /builds/fennec/certs
 split-directories = "toolkit/content/tests/widgets","content/canvas/test","content/html/content/test","layout/style/test","content/base/test","dom/tests/mochitest/dom-level1-core","dom/tests/mochitest/dom-level2-core"
 split-percentage = 20
 testroot = /builds/fennec/mochitest
 log-file = /builds/fennec/log_mochitest.txt
 profiledir = mochitesttestingprofile
 verbose = 1
+green-directories = "content/smil/test","content/xml/document/test",content/xslt/tests/mochitest","content/xul/document/test","content/xul/templates/tests","dom/src/json/test","dom/src/jsurl/test","dom/tests/mochitest/dom-level0","dom/tests/mochitest/dom-level1-core","dom/tests/mochitest/dom-level2-core","js/jsd/test","js/src/xpconnect/tests/mochitest"
 
 [chrome]
 autorun = True
 close-when-done = True
 utility-path = /builds/fennec/bin
 certificate-path = /builds/fennec/certs
 backupdir = chrome.bak
 testroot = /builds/fennec/mochitest
--- a/maemkit.cfg
+++ b/maemkit.cfg
@@ -15,16 +15,17 @@ test-path =
 utility-path = /builds/fennec/bin
 certificate-path = /builds/fennec/certs
 split-directories = "toolkit/content/tests/widgets","content/canvas/test","content/html/content/test","layout/style/test","content/base/test","dom/tests/mochitest/dom-level1-core","dom/tests/mochitest/dom-level2-core"
 split-percentage = 20
 testroot = /builds/fennec/mochitest
 log-file = /builds/fennec/log_mochitest.txt
 profiledir = mochitesttestingprofile
 verbose = 1
+green-directories = "content/smil/test","content/xml/document/test",content/xslt/tests/mochitest","content/xul/document/test","content/xul/templates/tests","dom/src/json/test","dom/src/jsurl/test","dom/tests/mochitest/dom-level0","dom/tests/mochitest/dom-level1-core","dom/tests/mochitest/dom-level2-core","js/jsd/test","js/src/xpconnect/tests/mochitest"
 
 [chrome]
 autorun = True
 close-when-done = True
 utility-path = /builds/fennec/bin
 certificate-path = /builds/fennec/certs
 backupdir = chrome.bak
 testroot = /builds/fennec/mochitest
--- a/maemkit.py
+++ b/maemkit.py
@@ -6,17 +6,17 @@ import ce
 class MaemKit(object):
   config_options = {}
   default_options = {}
   testtype = "mochitest"
   testdriver = ""
   config_file = "maemkit.cfg"
   dirtype = "/"
   debug = 0
-  singletest = True
+  singletest = False
   testagent = ce.TestAgentCE()
 
   testtypes = ["mochitest","chrome","reftest","crashtest","xpcshell",
                "browser-chrome"]
 
   def __init__(self):
     self.defaultOptions()
     self.getConfig()
--- a/mochidriver.py
+++ b/mochidriver.py
@@ -42,17 +42,21 @@ class MochiKit(maemkit.MaemKit):
             dirs.remove(directory)
           break
 
     # truncate path to path relative to tests directory
     testPatt = re.compile(testsDirPattern)
     for directory in dir:
       relDir = testPatt.match(directory)
       if relDir:
-        relDirectories.append(relDir.group(1))
+        if (self.options["green-directories"] is not None):
+         try:
+           if (self.options["green-directories"].index(relDir.group(1)) >= 0):
+             relDirectories.append(relDir.group(1))
+         except: continue
 
     relDirectories.sort()
     self.directories = relDirectories
 
 
   def getFiles(self, aDir):
     testFilePattern = 'test_.*'
 
@@ -249,18 +253,18 @@ class MochiKit(maemkit.MaemKit):
       self.mkLogDir(self.options["logdir"])
 
       #TODO: figure out a method for utilizing all the other config/cli options available
       self.mochitestCommand = ["python " + os.path.normpath(os.path.join(self.options["testroot"], "runtests.py")) + " --autorun --close-when-done"]
       for option in ["utility-path","appname","xre-path","certificate-path"]:
           self.mochitestCommand.append("--" + option + "=" + os.path.normpath(self.options[option]))
       mCommand = " ".join(self.mochitestCommand)
 
-      singletest = [self.options["appname"], '--environ:NO_EM_RESTART=1', '-no-remote', '-profile', os.path.join(self.options["remote-logdir"], self.options["profiledir"]) ]
       if (self.singletest == True):
+          singletest = [self.options["appname"], '--environ:NO_EM_RESTART=1', '-no-remote', '-profile', os.path.join(self.options["remote-logdir"], self.options["profiledir"]) ]
 #HACK: comment out for now to speed up on WinCE
 #          self.setupRemoteProfile()
           self.setupLocalWebserver()
 
       for directory in self.directories:
           if (self.singletest == True):
               cmd = "http://" + self.options["remote-webserver"] + "/tests/"
               cmd += directory.replace("\\", "/") + "?logFile="