def run_desktop_test(self, **kwargs):
        """Runs a reftest, in desktop Firefox."""
        import runreftest

        if kwargs["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")
        }

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

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

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

        if not kwargs["runTestsInParallel"]:
            kwargs["logFile"] = "%s.log" % kwargs["suite"]

        self.log_manager.enable_unstructured()
        try:
            rv = runreftest.run(**kwargs)
        finally:
            self.log_manager.disable_unstructured()

        return rv
    def run_desktop_test(self, **kwargs):
        """Runs a reftest, in desktop Firefox."""
        import runreftest

        if kwargs["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")
        }

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

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

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

        self.log_manager.enable_unstructured()
        try:
            rv = runreftest.run(**kwargs)
        finally:
            self.log_manager.disable_unstructured()

        return rv
Exemple #3
0
    def run_desktop_test(self, **kwargs):
        """Runs a reftest."""
        import runreftest

        if kwargs["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"),
        }

        kwargs["extraProfileFiles"] = [os.path.join(self.topobjdir, "dist", "plugins")]
        kwargs["symbolsPath"] = os.path.join(self.topobjdir, "crashreporter-symbols")

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

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

        if not kwargs["runTestsInParallel"]:
            kwargs["logFile"] = "%s.log" % kwargs["suite"]

        # Remove the stdout handler from the internal logger and let mach deal with it
        runreftest.log.removeHandler(runreftest.log.handlers[0])
        self.log_manager.enable_unstructured()
        rv = runreftest.run(**kwargs)
        self.log_manager.disable_unstructured()

        return rv
Exemple #4
0
    def run_desktop_test(self, **kwargs):
        """Runs a reftest, in desktop Firefox."""
        import runreftest

        if kwargs["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")
        }

        kwargs["extraProfileFiles"] = [
            os.path.join(self.topobjdir, "dist", "plugins")
        ]
        kwargs["symbolsPath"] = os.path.join(self.topobjdir,
                                             "crashreporter-symbols")

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

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

        if not kwargs["runTestsInParallel"]:
            kwargs["logFile"] = "%s.log" % kwargs["suite"]

        #Remove the stdout handler from the internal logger and let mach deal with it
        runreftest.log.removeHandler(runreftest.log.handlers[0])
        self.log_manager.enable_unstructured()
        try:
            rv = runreftest.run(**kwargs)
        finally:
            self.log_manager.disable_unstructured()

        return rv