コード例 #1
0
    def run_desktop_test(self, **kwargs):
        """Runs a reftest, in desktop Firefox."""
        import runreftest

        args = Namespace(**kwargs)
        if args.suite not in ('reftest', 'crashtest', 'jstestbrowser'):
            raise Exception('None or unrecognized reftest suite type.')

        default_manifest = {
            "reftest": (self.topsrcdir, "layout", "reftests", "reftest.list"),
            "crashtest": (self.topsrcdir, "testing", "crashtest", "crashtests.list"),
            "jstestbrowser": (self.topobjdir, "dist", "test-stage", "jsreftest", "tests",
                              "jstests.list")
        }

        args.extraProfileFiles.append(os.path.join(self.topobjdir, "dist", "plugins"))
        args.symbolsPath = os.path.join(self.topobjdir, "crashreporter-symbols")

        if not args.tests:
            args.tests = [os.path.join(*default_manifest[args.suite])]

        if args.suite == "jstestbrowser":
            args.extraProfileFiles.append(os.path.join(self.topobjdir, "dist",
                                                            "test-stage", "jsreftest",
                                                            "tests", "user.js"))

        self.log_manager.enable_unstructured()
        try:
            rv = runreftest.run_test_harness(parser, args)
        finally:
            self.log_manager.disable_unstructured()

        return rv
コード例 #2
0
    def run_desktop_test(self, **kwargs):
        """Runs a reftest, in desktop Firefox."""
        import runreftest

        args = Namespace(**kwargs)
        if args.suite not in ("reftest", "crashtest", "jstestbrowser"):
            raise Exception("None or unrecognized reftest suite type.")

        default_manifest = {
            "reftest": (self.topsrcdir, "layout", "reftests", "reftest.list"),
            "crashtest": (self.topsrcdir, "testing", "crashtest", "crashtests.list"),
            "jstestbrowser": (self.topobjdir, "dist", "test-stage", "jsreftest", "tests", "jstests.list"),
        }

        args.extraProfileFiles.append(os.path.join(self.topobjdir, "dist", "plugins"))
        args.symbolsPath = os.path.join(self.topobjdir, "crashreporter-symbols")

        if not args.tests:
            args.tests = [os.path.join(*default_manifest[args.suite])]

        if args.suite == "jstestbrowser":
            args.extraProfileFiles.append(
                os.path.join(self.topobjdir, "dist", "test-stage", "jsreftest", "tests", "user.js")
            )

        self.log_manager.enable_unstructured()
        try:
            rv = runreftest.run_test_harness(parser, args)
        finally:
            self.log_manager.disable_unstructured()

        return rv
コード例 #3
0
def run_reftest_desktop(context, args):
    from runreftest import run_test_harness

    args.app = args.app or context.firefox_bin
    args.extraProfileFiles.append(os.path.join(context.bin_dir, 'plugins'))
    args.utilityPath = context.bin_dir

    return run_test_harness(parser, args)
コード例 #4
0
def run_reftest_desktop(context, args):
    from runreftest import run_test_harness

    args.app = args.app or context.firefox_bin
    args.extraProfileFiles.append(os.path.join(context.bin_dir, 'plugins'))
    args.utilityPath = context.bin_dir

    return run_test_harness(parser, args)
コード例 #5
0
def run_reftest_desktop(context, args):
    from runreftest import run_test_harness

    args.app = args.app or context.firefox_bin
    args.extraProfileFiles.append(os.path.join(context.bin_dir, "plugins"))
    args.utilityPath = context.bin_dir
    args.sandboxReadWhitelist.append(context.mozharness_workdir)
    args.extraPrefs.append("layers.acceleration.force-enabled=true")

    logger.info("mach calling runreftest with args: " + str(args))

    return run_test_harness(parser, args)
コード例 #6
0
def run_reftest(context, **kwargs):
    kwargs['app'] = kwargs['app'] or context.firefox_bin
    kwargs['e10s'] = context.mozharness_config.get('e10s', kwargs['e10s'])
    kwargs['certPath'] = context.certs_dir
    kwargs['utilityPath'] = context.bin_dir
    kwargs['extraProfileFiles'].append(os.path.join(context.bin_dir,
                                                    'plugins'))

    if not kwargs['tests']:
        kwargs['tests'] = [os.path.join('layout', 'reftests', 'reftest.list')]

    test_root = os.path.join(context.package_root, 'reftest', 'tests')
    normalize = partial(context.normalize_test_path, test_root)
    kwargs['tests'] = map(normalize, kwargs['tests'])

    from runreftest import run as run_test_harness
    return run_test_harness(**kwargs)
コード例 #7
0
def run_reftest_android(context, args):
    from remotereftest import run_test_harness

    args.app = args.app or 'org.mozilla.fennec'
    args.utilityPath = context.hostutils
    args.xrePath = context.hostutils
    args.httpdPath = context.module_dir
    args.ignoreWindowSize = True
    args.printDeviceInfo = False

    config = context.mozharness_config
    if config:
        args.remoteWebServer = config['remote_webserver']
        args.httpPort = config['emulator']['http_port']
        args.sslPort = config['emulator']['ssl_port']
        args.adb_path = config['exes']['adb'] % {'abs_work_dir': context.mozharness_workdir}

    return run_test_harness(parser, args)
コード例 #8
0
def run_reftest(context, **kwargs):
    kwargs['certPath'] = context.certs_dir
    kwargs['utilityPath'] = context.bin_dir
    kwargs['extraProfileFiles'].append(os.path.join(context.bin_dir, 'plugins'))

    if not kwargs['app']:
        # This could still return None in which case --appname must be used
        # to specify the firefox binary.
        kwargs['app'] = context.find_firefox()

    if not kwargs['tests']:
        kwargs['tests'] = [os.path.join('layout', 'reftests', 'reftest.list')]

    test_root = os.path.join(context.package_root, 'reftest', 'tests')
    normalize = partial(context.normalize_test_path, test_root)
    kwargs['tests'] = map(normalize, kwargs['tests'])

    from runreftest import run as run_test_harness
    return run_test_harness(**kwargs)
コード例 #9
0
def run_reftest_android(context, args):
    from remotereftest import run_test_harness

    args.app = args.app or 'org.mozilla.fennec'
    args.utilityPath = context.hostutils
    args.xrePath = context.hostutils
    args.httpdPath = context.module_dir
    args.dm_trans = 'adb'
    args.ignoreWindowSize = True
    args.printDeviceInfo = False

    config = context.mozharness_config
    if config:
        args.remoteWebServer = config['remote_webserver']
        args.httpPort = config['emulator']['http_port']
        args.sslPort = config['emulator']['ssl_port']
        args.adb_path = config['exes']['adb'] % {'abs_work_dir': context.mozharness_workdir}

    return run_test_harness(parser, args)
コード例 #10
0
def run_reftest(context, **kwargs):
    kwargs['certPath'] = context.certs_dir
    kwargs['utilityPath'] = context.bin_dir
    kwargs['extraProfileFiles'].append(os.path.join(context.bin_dir,
                                                    'plugins'))

    if not kwargs['app']:
        # This could still return None in which case --appname must be used
        # to specify the firefox binary.
        kwargs['app'] = context.find_firefox()

    if not kwargs['tests']:
        kwargs['tests'] = [os.path.join('layout', 'reftests', 'reftest.list')]

    test_root = os.path.join(context.package_root, 'reftest', 'tests')
    normalize = partial(context.normalize_test_path, test_root)
    kwargs['tests'] = map(normalize, kwargs['tests'])

    from runreftest import run as run_test_harness
    return run_test_harness(**kwargs)
コード例 #11
0
def run_reftest_android(context, args):
    from remotereftest import run_test_harness

    args.app = args.app or "org.mozilla.geckoview.test"
    args.utilityPath = context.hostutils
    args.xrePath = context.hostutils
    args.httpdPath = context.module_dir
    args.ignoreWindowSize = True

    config = context.mozharness_config
    if config:
        host = os.environ.get("HOST_IP", "10.0.2.2")
        args.remoteWebServer = config.get("remote_webserver", host)
        args.httpPort = config.get("http_port", 8854)
        args.sslPort = config.get("ssl_port", 4454)
        args.adb_path = config["exes"]["adb"] % {
            "abs_work_dir": context.mozharness_workdir
        }
        args.deviceSerial = os.environ.get("DEVICE_SERIAL", "emulator-5554")

    logger.info("mach calling remotereftest with args: " + str(args))

    return run_test_harness(parser, args)
コード例 #12
0
def run_reftest_android(context, args):
    from remotereftest import run_test_harness

    args.app = args.app or 'org.mozilla.geckoview.test'
    args.utilityPath = context.hostutils
    args.xrePath = context.hostutils
    args.httpdPath = context.module_dir
    args.ignoreWindowSize = True
    args.printDeviceInfo = False

    config = context.mozharness_config
    if config:
        host = os.environ.get("HOST_IP", "10.0.2.2")
        args.remoteWebServer = config.get('remote_webserver', host)
        args.httpPort = config.get('http_port', 8854)
        args.sslPort = config.get('ssl_port', 4454)
        args.adb_path = config['exes']['adb'] % {
            'abs_work_dir': context.mozharness_workdir
        }
        args.deviceSerial = os.environ.get('DEVICE_SERIAL', 'emulator-5554')

    logger.info("mach calling remotereftest with args: " + str(args))

    return run_test_harness(parser, args)