Bug 795099 - Add --gecko-path argument to runreftestb2g.py, r=jgriffin; DONTBUILD because NPOTB, a=test-only
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 05 Oct 2012 11:12:05 -0400
changeset 113371 25243f7b1776c137d9cadc33608356f41beda3ac
parent 113370 fd0dcda77b6030bad2aa233ce7cbde9f706da8ee
child 113372 88c7703111d1dd153a354c59e2d9d5e93300b6c4
push id2311
push userjgriffin@mozilla.com
push dateMon, 15 Oct 2012 18:51:35 +0000
treeherdermozilla-aurora@25243f7b1776 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin, DONTBUILD, test-only
bugs795099
milestone18.0a2
Bug 795099 - Add --gecko-path argument to runreftestb2g.py, r=jgriffin; DONTBUILD because NPOTB, a=test-only
layout/tools/reftest/runreftestb2g.py
--- a/layout/tools/reftest/runreftestb2g.py
+++ b/layout/tools/reftest/runreftestb2g.py
@@ -95,16 +95,21 @@ class B2GOptions(ReftestOptions):
                     type = "string", dest = "sslPort",
                     help = "ip address where the remote web server is hosted at")
         defaults["sslPort"] = automation.DEFAULT_SSL_PORT
 
         self.add_option("--pidfile", action = "store",
                     type = "string", dest = "pidFile",
                     help = "name of the pidfile to generate")
         defaults["pidFile"] = ""
+        self.add_option("--gecko-path", action="store",
+                        type="string", dest="geckoPath",
+                        help="the path to a gecko distribution that should "
+                        "be installed on the emulator prior to test")
+        defaults["geckoPath"] = None
         defaults["remoteTestRoot"] = None
         defaults["logFile"] = "reftest.log"
         defaults["autorun"] = True
         defaults["closeWhenDone"] = True
         defaults["testPath"] = ""
 
         self.set_defaults(**defaults)
 
@@ -120,16 +125,19 @@ class B2GOptions(ReftestOptions):
             if os.name != "nt":
                 options.remoteWebServer = self._automation.getLanIp()
             else:
                 print "ERROR: you must specify a --remote-webserver=<ip address>\n"
                 return None
 
         options.webServer = options.remoteWebServer
 
+        if options.geckoPath and not options.emulator:
+            self.error("You must specify --emulator if you specify --gecko-path")
+
         #if not options.emulator and not options.deviceIP:
         #    print "ERROR: you must provide a device IP"
         #    return None
 
         if options.remoteLogFile == None:
             options.remoteLogFile = "reftest.log"
 
         options.localLogName = options.remoteLogFile
@@ -442,16 +450,18 @@ def main(args=sys.argv[1:]):
     if options.emulator_res:
         kwargs['emulator_res'] = options.emulator_res
     if options.b2gPath:
         kwargs['homedir'] = options.b2gPath
     if options.marionette:
         host,port = options.marionette.split(':')
         kwargs['host'] = host
         kwargs['port'] = int(port)
+    if options.geckoPath:
+        kwargs['gecko_path'] = options.geckoPath
     marionette = Marionette(**kwargs)
     auto.marionette = marionette
 
     # create the DeviceManager
     kwargs = {'adbPath': options.adbPath}
     if options.deviceIP:
         kwargs.update({'host': options.deviceIP,
                        'port': options.devicePort})