def __init__(self, automation):
        ReftestOptions.__init__(self, automation)

        defaults = {}
        defaults["logFile"] = "reftest.log"
        # app, xrePath and utilityPath variables are set in main function
        defaults["remoteTestRoot"] = None
        defaults["app"] = ""
        defaults["xrePath"] = ""
        defaults["utilityPath"] = ""

        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 = "Name of product to test - either fennec or firefox, defaults to fennec")
        defaults["remoteProductName"] = "fennec"

        self.add_option("--remote-webserver", action="store",
                    type = "string", dest = "remoteWebServer",
                    help = "IP Address of the webserver hosting the reftest content")
        defaults["remoteWebServer"] = automation.getLanIp() 

        self.add_option("--http-port", action = "store",
                    type = "string", dest = "httpPort",
                    help = "port of the web server for http traffic")
        defaults["httpPort"] = automation.DEFAULT_HTTP_PORT

        self.add_option("--ssl-port", action = "store",
                    type = "string", dest = "sslPort",
                    help = "Port for https traffic to the web server")
        defaults["sslPort"] = automation.DEFAULT_SSL_PORT

        self.add_option("--remote-logfile", action="store",
                    type = "string", dest = "remoteLogFile",
                    help = "Name of log file on the device relative to device root.  PLEASE USE ONLY A FILENAME.")
        defaults["remoteLogFile"] = None
        defaults["localLogName"] = None

        self.set_defaults(**defaults)
Example #2
0
def run_desktop_reftests(parser, options, args):
    marionette_args = {}
    if options.marionette:
        host, port = options.marionette.split(':')
        marionette_args['host'] = host
        marionette_args['port'] = int(port)

    if options.mulet:
        reftest = MuletReftest(marionette_args)
    else:
        reftest = B2GDesktopReftest(marionette_args)

    options = ReftestOptions.verifyCommonOptions(parser, options, reftest)
    if options == None:
        sys.exit(1)

    # 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

    if options.xrePath is None:
        options.xrePath = os.path.dirname(options.app)

    if options.desktop and not options.profile:
        raise Exception("must specify --profile when specifying --desktop")

    sys.exit(reftest.run_tests(args[0], options))
Example #3
0
def run_desktop_reftests(parser, options, args):
    marionette_args = {}
    if options.marionette:
        host, port = options.marionette.split(':')
        marionette_args['host'] = host
        marionette_args['port'] = int(port)

    reftest = B2GDesktopReftest(marionette_args)

    options = ReftestOptions.verifyCommonOptions(parser, options, reftest)
    if options == None:
        sys.exit(1)

    # 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

    if options.xrePath is None:
        options.xrePath = os.path.dirname(options.app)

    if options.desktop and not options.profile:
        raise Exception("must specify --profile when specifying --desktop")

    sys.exit(reftest.run_tests(args[0], options))
Example #4
0
def run_desktop_reftests(parser, options, args):
    kwargs = {}
    if options.marionette:
        host, port = options.marionette.split(':')
        kwargs['host'] = host
        kwargs['port'] = int(port)
    marionette = Marionette.getMarionetteOrExit(**kwargs)

    reftest = B2GDesktopReftest(marionette)

    options = ReftestOptions.verifyCommonOptions(parser, options, reftest)
    if options == None:
        sys.exit(1)

    # 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

    if options.desktop and not options.profile:
        raise Exception("must specify --profile when specifying --desktop")

    sys.exit(reftest.run_tests(args[0], options))
Example #5
0
    def __init__(self, automation):
        ReftestOptions.__init__(self)
        self.automation = automation

        defaults = {}
        defaults["logFile"] = "reftest.log"
        # app, xrePath and utilityPath variables are set in main function
        defaults["app"] = ""
        defaults["xrePath"] = ""
        defaults["utilityPath"] = ""
        defaults["runTestsInParallel"] = False

        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(
            "--deviceSerial",
            action="store",
            type="string",
            dest="deviceSerial",
            help="adb serial number of remote device to test",
        )
        defaults["deviceSerial"] = 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="Name of product to test - either fennec or firefox, defaults to fennec",
        )
        defaults["remoteProductName"] = "fennec"

        self.add_option(
            "--remote-webserver",
            action="store",
            type="string",
            dest="remoteWebServer",
            help="IP Address of the webserver hosting the reftest content",
        )
        defaults["remoteWebServer"] = moznetwork.get_ip()

        self.add_option(
            "--http-port",
            action="store",
            type="string",
            dest="httpPort",
            help="port of the web server for http traffic",
        )
        defaults["httpPort"] = automation.DEFAULT_HTTP_PORT

        self.add_option(
            "--ssl-port", action="store", type="string", dest="sslPort", help="Port for https traffic to the web server"
        )
        defaults["sslPort"] = automation.DEFAULT_SSL_PORT

        self.add_option(
            "--remote-logfile",
            action="store",
            type="string",
            dest="remoteLogFile",
            help="Name of log file on the device relative to device root.  PLEASE USE ONLY A FILENAME.",
        )
        defaults["remoteLogFile"] = None

        self.add_option(
            "--pidfile", action="store", type="string", dest="pidFile", help="name of the pidfile to generate"
        )
        defaults["pidFile"] = ""

        self.add_option(
            "--bootstrap",
            action="store_true",
            dest="bootstrap",
            help="test with a bootstrap addon required for native Fennec",
        )
        defaults["bootstrap"] = False

        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(
            "--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

        self.add_option(
            "--httpd-path", action="store", type="string", dest="httpdPath", help="path to the httpd.js file"
        )
        defaults["httpdPath"] = None

        defaults["localLogName"] = None

        self.set_defaults(**defaults)
Example #6
0
    def __init__(self, automation):
        ReftestOptions.__init__(self, automation)

        defaults = {}
        defaults["logFile"] = "reftest.log"
        # app, xrePath and utilityPath variables are set in main function
        defaults["app"] = ""
        defaults["xrePath"] = ""
        defaults["utilityPath"] = ""

        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=
            "Name of product to test - either fennec or firefox, defaults to fennec"
        )
        defaults["remoteProductName"] = "fennec"

        self.add_option(
            "--remote-webserver",
            action="store",
            type="string",
            dest="remoteWebServer",
            help="IP Address of the webserver hosting the reftest content")
        defaults["remoteWebServer"] = automation.getLanIp()

        self.add_option("--http-port",
                        action="store",
                        type="string",
                        dest="httpPort",
                        help="port of the web server for http traffic")
        defaults["httpPort"] = automation.DEFAULT_HTTP_PORT

        self.add_option("--ssl-port",
                        action="store",
                        type="string",
                        dest="sslPort",
                        help="Port for https traffic to the web server")
        defaults["sslPort"] = automation.DEFAULT_SSL_PORT

        self.add_option(
            "--remote-logfile",
            action="store",
            type="string",
            dest="remoteLogFile",
            help=
            "Name of log file on the device relative to device root.  PLEASE USE ONLY A FILENAME."
        )
        defaults["remoteLogFile"] = None

        self.add_option(
            "--enable-privilege",
            action="store_true",
            dest="enablePrivilege",
            help=
            "add webserver and port to the user.js file for remote script access and universalXPConnect"
        )
        defaults["enablePrivilege"] = False

        self.add_option("--pidfile",
                        action="store",
                        type="string",
                        dest="pidFile",
                        help="name of the pidfile to generate")
        defaults["pidFile"] = ""

        self.add_option(
            "--bootstrap",
            action="store_true",
            dest="bootstrap",
            help="test with a bootstrap addon required for native Fennec")
        defaults["bootstrap"] = False

        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(
            "--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

        self.add_option("--httpd-path",
                        action="store",
                        type="string",
                        dest="httpdPath",
                        help="path to the httpd.js file")
        defaults["httpdPath"] = None

        defaults["localLogName"] = None

        self.set_defaults(**defaults)
Example #7
0
    def __init__(self, automation, **kwargs):
        defaults = {}
        ReftestOptions.__init__(self, automation)

        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(
            "--emulator-res",
            action="store",
            type="string",
            dest="emulator_res",
            help="Emulator resolution of the format '<width>x<height>'",
        )
        defaults["emulator_res"] = 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(
            "--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"] = "reftest.log"
        defaults["autorun"] = True
        defaults["closeWhenDone"] = True
        defaults["testPath"] = ""

        self.set_defaults(**defaults)
Example #8
0
    def __init__(self, **kwargs):
        defaults = {}
        ReftestOptions.__init__(self)
        # This is only used for procName in run_remote_reftests.
        defaults["app"] = Automation.DEFAULT_APP

        self.add_option(
            "--browser-arg",
            action="store",
            type="string",
            dest="browser_arg",
            help="Optional command-line arg to pass to the browser")
        defaults["browser_arg"] = None

        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(
            "--emulator-res",
            action="store",
            type="string",
            dest="emulator_res",
            help="Emulator resolution of the format '<width>x<height>'")
        defaults["emulator_res"] = 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="adb_path",
                        help="path to adb")
        defaults["adb_path"] = "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"] = None

        self.add_option(
            "--ssl-port",
            action="store",
            type="string",
            dest="sslPort",
            help="ip address where the remote web server is hosted at")
        defaults["sslPort"] = None

        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("--logdir",
                        action="store",
                        type="string",
                        dest="logdir",
                        help="directory to store log files")
        defaults["logdir"] = 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("--httpd-path",
                        action="store",
                        type="string",
                        dest="httpdPath",
                        help="path to the httpd.js file")
        defaults["httpdPath"] = 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("--desktop",
                        action="store_true",
                        dest="desktop",
                        help="Run the tests on a B2G desktop build")
        defaults["desktop"] = False
        self.add_option("--mulet",
                        action="store_true",
                        dest="mulet",
                        help="Run the tests on a B2G desktop build")
        defaults["mulet"] = False
        self.add_option("--enable-oop",
                        action="store_true",
                        dest="oop",
                        help="Run the tests out of process")
        defaults["oop"] = False
        defaults["remoteTestRoot"] = None
        defaults["logFile"] = "reftest.log"
        defaults["autorun"] = True
        defaults["closeWhenDone"] = True
        defaults["testPath"] = ""
        defaults["runTestsInParallel"] = False

        self.set_defaults(**defaults)
Example #9
0
    def __init__(self, **kwargs):
        defaults = {}
        ReftestOptions.__init__(self)

        self.add_option("--browser-arg", action="store",
                    type = "string", dest = "browser_arg",
                    help = "Optional command-line arg to pass to the browser")
        defaults["browser_arg"] = None

        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("--emulator-res", action="store",
                    type="string", dest = "emulator_res",
                    help = "Emulator resolution of the format '<width>x<height>'")
        defaults["emulator_res"] = 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"] = None

        self.add_option("--ssl-port", action = "store",
                    type = "string", dest = "sslPort",
                    help = "ip address where the remote web server is hosted at")
        defaults["sslPort"] = None

        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("--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("--httpd-path", action = "store",
                    type = "string", dest = "httpdPath",
                    help = "path to the httpd.js file")
        defaults["httpdPath"] = 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("--desktop", action="store_true",
                        dest="desktop",
                        help="Run the tests on a B2G desktop build")
        defaults["desktop"] = False
        self.add_option("--enable-oop", action="store_true",
                        dest="oop",
                        help="Run the tests out of process")
        defaults["oop"] = False
        defaults["remoteTestRoot"] = None
        defaults["logFile"] = "reftest.log"
        defaults["autorun"] = True
        defaults["closeWhenDone"] = True
        defaults["testPath"] = ""
        defaults["runTestsInParallel"] = False

        self.set_defaults(**defaults)
    def __init__(self, automation=None, **kwargs):
        defaults = {}
        if not automation:
            automation = B2GRemoteAutomation(None,
                                             "fennec",
                                             context_chrome=True)

        ReftestOptions.__init__(self, automation)

        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(
            "--emulator-res",
            action="store",
            type="string",
            dest="emulator_res",
            help="Emulator resolution of the format '<width>x<height>'")
        defaults["emulator_res"] = 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("--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("--httpd-path",
                        action="store",
                        type="string",
                        dest="httpdPath",
                        help="path to the httpd.js file")
        defaults["httpdPath"] = None
        defaults["remoteTestRoot"] = "/data/local/tests"
        defaults["logFile"] = "reftest.log"
        defaults["autorun"] = True
        defaults["closeWhenDone"] = True
        defaults["testPath"] = ""

        self.set_defaults(**defaults)
Example #11
0
    def __init__(self, automation):
        ReftestOptions.__init__(self, automation)

        defaults = {}
        defaults["logFile"] = "reftest.log"
        # app, xrePath and utilityPath variables are set in main function
        defaults["remoteTestRoot"] = None
        defaults["app"] = ""
        defaults["xrePath"] = ""
        defaults["utilityPath"] = ""

        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=
            "Name of product to test - either fennec or firefox, defaults to fennec"
        )
        defaults["remoteProductName"] = "fennec"

        self.add_option(
            "--remote-webserver",
            action="store",
            type="string",
            dest="remoteWebServer",
            help="IP Address of the webserver hosting the reftest content")
        defaults["remoteWebServer"] = automation.getLanIp()

        self.add_option("--http-port",
                        action="store",
                        type="string",
                        dest="httpPort",
                        help="port of the web server for http traffic")
        defaults["httpPort"] = automation.DEFAULT_HTTP_PORT

        self.add_option("--ssl-port",
                        action="store",
                        type="string",
                        dest="sslPort",
                        help="Port for https traffic to the web server")
        defaults["sslPort"] = automation.DEFAULT_SSL_PORT

        self.add_option(
            "--remote-logfile",
            action="store",
            type="string",
            dest="remoteLogFile",
            help=
            "Name of log file on the device relative to device root.  PLEASE USE ONLY A FILENAME."
        )
        defaults["remoteLogFile"] = None
        defaults["localLogName"] = None

        self.set_defaults(**defaults)
    def __init__(self, automation, **kwargs):
        defaults = {}
        ReftestOptions.__init__(self, automation)

        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("--emulator-res", action="store",
                    type="string", dest = "emulator_res",
                    help = "Emulator resolution of the format '<width>x<height>'")
        defaults["emulator_res"] = 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"] = ""
        defaults["remoteTestRoot"] = None
        defaults["logFile"] = "reftest.log"
        defaults["autorun"] = True
        defaults["closeWhenDone"] = True
        defaults["testPath"] = ""

        self.set_defaults(**defaults)