def __init__(self, automation, mochitest, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, mochitest.SCRIPT_DIRECTORY) def checkPathCallback(option, opt_str, value, parser): path = mochitest.getFullPath(value) if not os.path.exists(path): raise OptionValueError("Path %s does not exist for %s option" % (path, opt_str)) setattr(parser.values, option.dest, path) self.add_option("--with-vmware-vm", action = "callback", type = "string", dest = "vmx", callback = checkPathCallback, help = "launches the given VM and runs mochitests inside") defaults["vmx"] = None self.add_option("--with-vmrun-executable", action = "callback", type = "string", dest = "vmrun", callback = checkPathCallback, help = "specifies the vmrun.exe to use for VMware control") defaults["vmrun"] = None self.add_option("--shutdown-vm-when-done", action = "store_true", dest = "shutdownVM", help = "shuts down the VM when mochitests complete") defaults["shutdownVM"] = False self.add_option("--repeat-until-failure", action = "store_true", dest = "repeatUntilFailure", help = "Runs tests continuously until failure") defaults["repeatUntilFailure"] = False self.set_defaults(**defaults)
def __init__(self, automation, scriptdir, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, scriptdir) self.add_option("--remote-app-path", action="store", type = "string", dest = "remoteAppPath", help = "Path to remote executable relative to device root using only forward slashes. Either this or app must be specified but not both") defaults["remoteAppPath"] = None self.add_option("--deviceIP", action="store", type = "string", dest = "deviceIP", help = "ip address of remote device to test") defaults["deviceIP"] = None self.add_option("--devicePort", action="store", type = "string", dest = "devicePort", help = "port of remote device to test") defaults["devicePort"] = 20701 self.add_option("--remote-product-name", action="store", type = "string", dest = "remoteProductName", help = "The executable's name of remote product to test - either fennec or firefox, defaults to fennec") defaults["remoteProductName"] = "fennec" self.add_option("--remote-logfile", action="store", type = "string", dest = "remoteLogFile", help = "Name of log file on the device relative to the device root. PLEASE ONLY USE A FILENAME.") defaults["remoteLogFile"] = None self.add_option("--remote-webserver", action = "store", type = "string", dest = "remoteWebServer", help = "ip address where the remote web server is hosted at") defaults["remoteWebServer"] = None self.add_option("--http-port", action = "store", type = "string", dest = "httpPort", help = "ip address where the remote web server is hosted at") defaults["httpPort"] = automation.DEFAULT_HTTP_PORT self.add_option("--ssl-port", action = "store", 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"] = "" defaults["remoteTestRoot"] = None defaults["logFile"] = "mochitest.log" defaults["autorun"] = True defaults["closeWhenDone"] = True defaults["testPath"] = "" defaults["app"] = None self.set_defaults(**defaults)
def __init__(self, automation, scriptdir, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, scriptdir) self.add_option("--remote-app-path", action="store", type = "string", dest = "remoteAppPath", help = "Path to remote executable relative to device root using only forward slashes. Either this or app must be specified but not both") defaults["remoteAppPath"] = None self.add_option("--deviceIP", action="store", type = "string", dest = "deviceIP", help = "ip address of remote device to test") defaults["deviceIP"] = None self.add_option("--devicePort", action="store", type = "string", dest = "devicePort", help = "port of remote device to test") defaults["devicePort"] = 20701 self.add_option("--remote-product-name", action="store", type = "string", dest = "remoteProductName", help = "The executable's name of remote product to test - either fennec or firefox, defaults to fennec") defaults["remoteProductName"] = "fennec" self.add_option("--remote-logfile", action="store", type = "string", dest = "remoteLogFile", help = "Name of log file on the device relative to the device root. PLEASE ONLY USE A FILENAME.") defaults["remoteLogFile"] = None self.add_option("--remote-webserver", action = "store", type = "string", dest = "remoteWebServer", help = "ip address where the remote web server is hosted at") defaults["remoteWebServer"] = None self.add_option("--http-port", action = "store", type = "string", dest = "httpPort", help = "ip address where the remote web server is hosted at") defaults["httpPort"] = automation.DEFAULT_HTTP_PORT self.add_option("--ssl-port", action = "store", type = "string", dest = "sslPort", help = "ip address where the remote web server is hosted at") defaults["sslPort"] = automation.DEFAULT_SSL_PORT defaults["remoteTestRoot"] = None defaults["logFile"] = "mochitest.log" defaults["autorun"] = True defaults["closeWhenDone"] = True defaults["testPath"] = "" defaults["app"] = None self.set_defaults(**defaults)
def run_desktop_mochitests(parser, options): automation = B2GDesktopAutomation() # create our Marionette instance kwargs = {} if options.marionette: host, port = options.marionette.split(':') kwargs['host'] = host kwargs['port'] = int(port) marionette = Marionette.getMarionetteOrExit(**kwargs) automation.marionette = marionette mochitest = B2GDesktopMochitest(automation) # b2g desktop builds don't always have a b2g-bin file if options.app[-4:] == '-bin': options.app = options.app[:-4] options = MochitestOptions.verifyOptions(parser, options, mochitest) if options == None: sys.exit(1) if options.desktop and not options.profile: raise Exception("must specify --profile when specifying --desktop") automation.setServerInfo(options.webServer, options.httpPort, options.sslPort, options.webSocketPort) sys.exit(mochitest.runTests(options, onLaunch=mochitest.startTests))
def run_desktop_mochitests(parser, options): # create our Marionette instance kwargs = {} if options.marionette: host, port = options.marionette.split(':') kwargs['host'] = host kwargs['port'] = int(port) marionette = Marionette.getMarionetteOrExit(**kwargs) mochitest = B2GDesktopMochitest(marionette, options.profile_data_dir) # add a -bin suffix if b2g-bin exists, but just b2g was specified if options.app[-4:] != '-bin': if os.path.isfile("%s-bin" % options.app): options.app = "%s-bin" % options.app options = MochitestOptions.verifyOptions(parser, options, mochitest) if options == None: sys.exit(1) if options.desktop and not options.profile: raise Exception("must specify --profile when specifying --desktop") options.browserArgs += ['-marionette'] sys.exit(mochitest.runTests(options, onLaunch=mochitest.startTests))
def run_desktop_mochitests(parser, options): automation = B2GDesktopAutomation() # create our Marionette instance kwargs = {} if options.marionette: host, port = options.marionette.split(':') kwargs['host'] = host kwargs['port'] = int(port) marionette = Marionette.getMarionetteOrExit(**kwargs) automation.marionette = marionette mochitest = B2GDesktopMochitest(automation, options) # b2g desktop builds don't always have a b2g-bin file if options.app[-4:] == '-bin': options.app = options.app[:-4] options = MochitestOptions.verifyOptions(parser, options, mochitest) if options == None: sys.exit(1) if options.desktop and not options.profile: raise Exception("must specify --profile when specifying --desktop") automation.setServerInfo(options.webServer, options.httpPort, options.sslPort, options.webSocketPort) sys.exit(mochitest.runTests(options, onLaunch=mochitest.startTests))
def verifyOptions(self, options, mochitest): # since we are reusing verifyOptions, it will exit if App is not found temp = options.app options.app = sys.argv[0] tempPort = options.httpPort tempSSL = options.sslPort tempIP = options.webServer options = MochitestOptions.verifyOptions(self, options, mochitest) options.webServer = tempIP options.app = temp options.sslPort = tempSSL options.httpPort = tempPort return options
def run_desktop_mochitests(parser, options): # create our Marionette instance kwargs = {} if options.marionette: host, port = options.marionette.split(':') kwargs['host'] = host kwargs['port'] = int(port) marionette = Marionette.getMarionetteOrExit(**kwargs) mochitest = B2GDesktopMochitest(marionette, options.profile_data_dir) # b2g desktop builds don't always have a b2g-bin file if options.app[-4:] == '-bin': options.app = options.app[:-4] options = MochitestOptions.verifyOptions(parser, options, mochitest) if options == None: sys.exit(1) if options.desktop and not options.profile: raise Exception("must specify --profile when specifying --desktop") sys.exit(mochitest.runTests(options, onLaunch=mochitest.startTests))
def __init__(self, automation, scriptdir, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, scriptdir) self.add_option( "--remote-app-path", action="store", type="string", dest="remoteAppPath", help= "Path to remote executable relative to device root using only forward slashes. Either this or app must be specified but not both" ) defaults["remoteAppPath"] = None self.add_option("--deviceIP", action="store", type="string", dest="deviceIP", help="ip address of remote device to test") defaults["deviceIP"] = None self.add_option( "--dm_trans", action="store", type="string", dest="dm_trans", help= "the transport to use to communicate with device: [adb|sut]; default=sut" ) defaults["dm_trans"] = "sut" self.add_option("--devicePort", action="store", type="string", dest="devicePort", help="port of remote device to test") defaults["devicePort"] = 20701 self.add_option( "--remote-product-name", action="store", type="string", dest="remoteProductName", help= "The executable's name of remote product to test - either fennec or firefox, defaults to fennec" ) defaults["remoteProductName"] = "fennec" self.add_option( "--remote-logfile", action="store", type="string", dest="remoteLogFile", help= "Name of log file on the device relative to the device root. PLEASE ONLY USE A FILENAME." ) defaults["remoteLogFile"] = None self.add_option( "--remote-webserver", action="store", type="string", dest="remoteWebServer", help="ip address where the remote web server is hosted at") defaults["remoteWebServer"] = None self.add_option("--http-port", action="store", type="string", dest="httpPort", help="http port of the remote web server") defaults["httpPort"] = automation.DEFAULT_HTTP_PORT self.add_option("--ssl-port", action="store", type="string", dest="sslPort", help="ssl port of the remote web server") 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( "--robocop", action="store", type="string", dest="robocop", help="name of the .ini file containing the list of tests to run") defaults["robocop"] = "" self.add_option( "--robocop-path", action="store", type="string", dest="robocopPath", help= "Path to the folder where robocop.apk is located at. Primarily used for ADB test running" ) defaults["robocopPath"] = "" self.add_option( "--robocop-ids", action="store", type="string", dest="robocopIds", help="name of the file containing the view ID map (fennec_ids.txt)" ) defaults["robocopIds"] = "" defaults["remoteTestRoot"] = None defaults["logFile"] = "mochitest.log" defaults["autorun"] = True defaults["closeWhenDone"] = True defaults["testPath"] = "" defaults["app"] = None self.set_defaults(**defaults)
def __init__(self, automation, scriptdir, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, scriptdir) self.add_option("--b2gpath", action="store", type = "string", dest = "b2gPath", help = "path to B2G repo or qemu dir") defaults["b2gPath"] = None self.add_option("--marionette", action="store", type = "string", dest = "marionette", help = "host:port to use when connecting to Marionette") defaults["marionette"] = None self.add_option("--emulator", action="store", type="string", dest = "emulator", help = "Architecture of emulator to use: x86 or arm") defaults["emulator"] = None self.add_option("--adbpath", action="store", type = "string", dest = "adbPath", help = "path to adb") defaults["adbPath"] = "adb" self.add_option("--deviceIP", action="store", type = "string", dest = "deviceIP", help = "ip address of remote device to test") defaults["deviceIP"] = None self.add_option("--devicePort", action="store", type = "string", dest = "devicePort", help = "port of remote device to test") defaults["devicePort"] = 20701 self.add_option("--remote-logfile", action="store", type = "string", dest = "remoteLogFile", help = "Name of log file on the device relative to the device root. PLEASE ONLY USE A FILENAME.") defaults["remoteLogFile"] = None self.add_option("--remote-webserver", action = "store", type = "string", dest = "remoteWebServer", help = "ip address where the remote web server is hosted at") defaults["remoteWebServer"] = None self.add_option("--http-port", action = "store", type = "string", dest = "httpPort", help = "ip address where the remote web server is hosted at") defaults["httpPort"] = automation.DEFAULT_HTTP_PORT self.add_option("--ssl-port", action = "store", 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"] = "" defaults["remoteTestRoot"] = None defaults["logFile"] = "mochitest.log" defaults["autorun"] = True defaults["closeWhenDone"] = True defaults["testPath"] = "" self.set_defaults(**defaults)
def __init__(self, automation, scriptdir, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, scriptdir) self.add_option("--remote-app-path", action="store", type = "string", dest = "remoteAppPath", help = "Path to remote executable relative to device root using only forward slashes. Either this or app must be specified but not both") defaults["remoteAppPath"] = None self.add_option("--deviceIP", action="store", type = "string", dest = "deviceIP", help = "ip address of remote device to test") defaults["deviceIP"] = None self.add_option("--dm_trans", action="store", type = "string", dest = "dm_trans", help = "the transport to use to communicate with device: [adb|sut]; default=sut") defaults["dm_trans"] = "sut" self.add_option("--devicePort", action="store", type = "string", dest = "devicePort", help = "port of remote device to test") defaults["devicePort"] = 20701 self.add_option("--remote-product-name", action="store", type = "string", dest = "remoteProductName", help = "The executable's name of remote product to test - either fennec or firefox, defaults to fennec") defaults["remoteProductName"] = "fennec" self.add_option("--remote-logfile", action="store", type = "string", dest = "remoteLogFile", help = "Name of log file on the device relative to the device root. PLEASE ONLY USE A FILENAME.") defaults["remoteLogFile"] = None self.add_option("--remote-webserver", action = "store", type = "string", dest = "remoteWebServer", help = "ip address where the remote web server is hosted at") defaults["remoteWebServer"] = None self.add_option("--http-port", action = "store", type = "string", dest = "httpPort", help = "http port of the remote web server") defaults["httpPort"] = automation.DEFAULT_HTTP_PORT self.add_option("--ssl-port", action = "store", type = "string", dest = "sslPort", help = "ssl port of the remote web server") 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("--robocop", action = "store", type = "string", dest = "robocop", help = "name of the .ini file containing the list of tests to run") defaults["robocop"] = "" self.add_option("--robocop-path", action = "store", type = "string", dest = "robocopPath", help = "Path to the folder where robocop.apk is located at. Primarily used for ADB test running") defaults["robocopPath"] = "" self.add_option("--robocop-ids", action = "store", type = "string", dest = "robocopIds", help = "name of the file containing the view ID map (fennec_ids.txt)") defaults["robocopIds"] = "" self.add_option("--remoteTestRoot", action = "store", type = "string", dest = "remoteTestRoot", help = "remote directory to use as test root (eg. /mnt/sdcard/tests or /data/local/tests)") defaults["remoteTestRoot"] = None defaults["logFile"] = "mochitest.log" defaults["autorun"] = True defaults["closeWhenDone"] = True defaults["testPath"] = "" defaults["app"] = None self.set_defaults(**defaults)
def __init__(self, automation, scriptdir, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, scriptdir) self.add_option("--b2gpath", action="store", type="string", dest="b2gPath", help="path to B2G repo or qemu dir") defaults["b2gPath"] = None self.add_option("--desktop", action="store_true", dest="desktop", help="Run the tests on a B2G desktop build") defaults["desktop"] = False self.add_option("--marionette", action="store", type="string", dest="marionette", help="host:port to use when connecting to Marionette") defaults["marionette"] = None self.add_option("--emulator", action="store", type="string", dest="emulator", help="Architecture of emulator to use: x86 or arm") defaults["emulator"] = None self.add_option("--sdcard", action="store", type="string", dest="sdcard", help="Define size of sdcard: 1MB, 50MB...etc") defaults["sdcard"] = None self.add_option("--no-window", action="store_true", dest="noWindow", help="Pass --no-window to the emulator") defaults["noWindow"] = False self.add_option("--adbpath", action="store", type="string", dest="adbPath", help="path to adb") defaults["adbPath"] = "adb" self.add_option("--deviceIP", action="store", type="string", dest="deviceIP", help="ip address of remote device to test") defaults["deviceIP"] = None self.add_option("--devicePort", action="store", type="string", dest="devicePort", help="port of remote device to test") defaults["devicePort"] = 20701 self.add_option("--remote-logfile", action="store", type="string", dest="remoteLogFile", help="Name of log file on the device relative to the device root. PLEASE ONLY USE A FILENAME.") defaults["remoteLogFile"] = None self.add_option("--remote-webserver", action="store", type="string", dest="remoteWebServer", help="ip address where the remote web server is hosted at") defaults["remoteWebServer"] = None self.add_option("--http-port", action="store", type="string", dest="httpPort", help="ip address where the remote web server is hosted at") defaults["httpPort"] = automation.DEFAULT_HTTP_PORT self.add_option("--ssl-port", action="store", 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 self.add_option("--profile", action="store", type="string", dest="profile", help="for desktop testing, the path to the " "gaia profile to use") defaults["profile"] = None self.add_option("--logcat-dir", action="store", type="string", dest="logcat_dir", help="directory to store logcat dump files") defaults["logcat_dir"] = None self.add_option('--busybox', action='store', type='string', dest='busybox', help="Path to busybox binary to install on device") defaults['busybox'] = None defaults["remoteTestRoot"] = "/data/local/tests" defaults["logFile"] = "mochitest.log" defaults["autorun"] = True defaults["closeWhenDone"] = True defaults["testPath"] = "" defaults["extensionsToExclude"] = ["specialpowers"] self.set_defaults(**defaults)
def __init__(self, automation, scriptdir, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, scriptdir) self.add_option("--b2gpath", action="store", type="string", dest="b2gPath", help="path to B2G repo or qemu dir") defaults["b2gPath"] = None self.add_option("--marionette", action="store", type="string", dest="marionette", help="host:port to use when connecting to Marionette") defaults["marionette"] = None self.add_option("--emulator", action="store", type="string", dest="emulator", help="Architecture of emulator to use: x86 or arm") defaults["emulator"] = None self.add_option("--sdcard", action="store", type="string", dest="sdcard", help="Define size of sdcard: 1MB, 50MB...etc") defaults["sdcard"] = None self.add_option("--no-window", action="store_true", dest="noWindow", help="Pass --no-window to the emulator") defaults["noWindow"] = False self.add_option("--adbpath", action="store", type="string", dest="adbPath", help="path to adb") defaults["adbPath"] = "adb" self.add_option("--deviceIP", action="store", type="string", dest="deviceIP", help="ip address of remote device to test") defaults["deviceIP"] = None self.add_option("--devicePort", action="store", type="string", dest="devicePort", help="port of remote device to test") defaults["devicePort"] = 20701 self.add_option( "--remote-logfile", action="store", type="string", dest="remoteLogFile", help= "Name of log file on the device relative to the device root. PLEASE ONLY USE A FILENAME." ) defaults["remoteLogFile"] = None self.add_option( "--remote-webserver", action="store", type="string", dest="remoteWebServer", help="ip address where the remote web server is hosted at") defaults["remoteWebServer"] = None self.add_option( "--http-port", action="store", type="string", dest="httpPort", help="ip address where the remote web server is hosted at") defaults["httpPort"] = automation.DEFAULT_HTTP_PORT self.add_option( "--ssl-port", action="store", 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"] = "mochitest.log" defaults["autorun"] = True defaults["closeWhenDone"] = True defaults["testPath"] = "" defaults["extensionsToExclude"] = ["specialpowers"] self.set_defaults(**defaults)
def __init__(self, automation, scriptdir, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, scriptdir) self.add_option("--b2gpath", action="store", type="string", dest="b2gPath", help="path to B2G repo or qemu dir") defaults["b2gPath"] = None self.add_option("--desktop", action="store_true", dest="desktop", help="Run the tests on a B2G desktop build") defaults["desktop"] = False self.add_option("--marionette", action="store", type="string", dest="marionette", help="host:port to use when connecting to Marionette") defaults["marionette"] = None self.add_option("--emulator", action="store", type="string", dest="emulator", help="Architecture of emulator to use: x86 or arm") defaults["emulator"] = None self.add_option("--sdcard", action="store", type="string", dest="sdcard", help="Define size of sdcard: 1MB, 50MB...etc") defaults["sdcard"] = "10MB" self.add_option("--no-window", action="store_true", dest="noWindow", help="Pass --no-window to the emulator") defaults["noWindow"] = False self.add_option("--adbpath", action="store", type="string", dest="adbPath", help="path to adb") defaults["adbPath"] = "adb" self.add_option("--deviceIP", action="store", type="string", dest="deviceIP", help="ip address of remote device to test") defaults["deviceIP"] = None self.add_option("--devicePort", action="store", type="string", dest="devicePort", help="port of remote device to test") defaults["devicePort"] = 20701 self.add_option( "--remote-logfile", action="store", type="string", dest="remoteLogFile", help= "Name of log file on the device relative to the device root. PLEASE ONLY USE A FILENAME." ) defaults["remoteLogFile"] = None self.add_option( "--remote-webserver", action="store", type="string", dest="remoteWebServer", help="ip address where the remote web server is hosted at") defaults["remoteWebServer"] = None self.add_option( "--http-port", action="store", type="string", dest="httpPort", help="ip address where the remote web server is hosted at") defaults["httpPort"] = automation.DEFAULT_HTTP_PORT self.add_option( "--ssl-port", action="store", 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 self.add_option("--profile", action="store", type="string", dest="profile", help="for desktop testing, the path to the " "gaia profile to use") defaults["profile"] = None self.add_option("--logcat-dir", action="store", type="string", dest="logcat_dir", help="directory to store logcat dump files") defaults["logcat_dir"] = None self.add_option('--busybox', action='store', type='string', dest='busybox', help="Path to busybox binary to install on device") defaults['busybox'] = None self.add_option( '--profile-data-dir', action='store', type='string', dest='profile_data_dir', help="Path to a directory containing preference and other " "data to be installed into the profile") defaults['profile_data_dir'] = os.path.join(here, 'profile_data') defaults["remoteTestRoot"] = "/data/local/tests" defaults["logFile"] = "mochitest.log" defaults["autorun"] = True defaults["closeWhenDone"] = True defaults["testPath"] = "" defaults["extensionsToExclude"] = ["specialpowers"] self.set_defaults(**defaults)
def __init__(self, automation, scriptdir, **kwargs): defaults = {} MochitestOptions.__init__(self, automation, scriptdir) self.add_option("--b2gpath", action="store", type = "string", dest = "b2gPath", help = "path to B2G repo or qemu dir") defaults["b2gPath"] = None self.add_option("--marionette", action="store", type = "string", dest = "marionette", help = "host:port to use when connecting to Marionette") defaults["marionette"] = None self.add_option("--emulator", action="store_true", dest = "emulator", help = "True if using a b2g emulator") defaults["emulator"] = False self.add_option("--adbpath", action="store", type = "string", dest = "adbPath", help = "path to adb") defaults["adbPath"] = "adb" self.add_option("--deviceIP", action="store", type = "string", dest = "deviceIP", help = "ip address of remote device to test") defaults["deviceIP"] = None self.add_option("--devicePort", action="store", type = "string", dest = "devicePort", help = "port of remote device to test") defaults["devicePort"] = 20701 self.add_option("--remote-logfile", action="store", type = "string", dest = "remoteLogFile", help = "Name of log file on the device relative to the device root. PLEASE ONLY USE A FILENAME.") defaults["remoteLogFile"] = None self.add_option("--remote-webserver", action = "store", type = "string", dest = "remoteWebServer", help = "ip address where the remote web server is hosted at") defaults["remoteWebServer"] = None self.add_option("--http-port", action = "store", type = "string", dest = "httpPort", help = "ip address where the remote web server is hosted at") defaults["httpPort"] = automation.DEFAULT_HTTP_PORT self.add_option("--ssl-port", action = "store", 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"] = "" defaults["remoteTestRoot"] = None defaults["logFile"] = "mochitest.log" defaults["autorun"] = True defaults["closeWhenDone"] = True defaults["testPath"] = "" self.set_defaults(**defaults)