示例#1
0
    def test_commands(self):
        port = self.make_port(port_name="mac")
        self.assertEqual(port.tooling_flag(), "--port=mac")
        self.assertEqual(port.update_webkit_command(),
                         Port.script_shell_command("update-webkit"))
        self.assertEqual(port.check_webkit_style_command(),
                         Port.script_shell_command("check-webkit-style"))
        self.assertEqual(port.prepare_changelog_command(),
                         Port.script_shell_command("prepare-ChangeLog"))
        self.assertEqual(port.build_webkit_command(),
                         Port.script_shell_command("build-webkit"))
        self.assertEqual(port.run_javascriptcore_tests_command(),
                         Port.script_shell_command("run-javascriptcore-tests"))
        self.assertEqual(port.run_webkit_unit_tests_command(), None)
        self.assertEqual(port.run_webkit_tests_command(),
                         Port.script_shell_command("run-webkit-tests"))
        self.assertEqual(port.run_python_unittests_command(),
                         Port.script_shell_command("test-webkitpy"))
        self.assertEqual(port.run_perl_unittests_command(),
                         Port.script_shell_command("test-webkitperl"))
        self.assertEqual(port.run_bindings_tests_command(),
                         Port.script_shell_command("run-bindings-tests"))

        port = self.make_port(port_name="mac",
                              options=MockOptions(webkit_test_runner=True))
        self.assertEqual(port.tooling_flag(), "--port=mac-wk2")
        self.assertEqual(port.update_webkit_command(),
                         Port.script_shell_command("update-webkit"))
        self.assertEqual(port.check_webkit_style_command(),
                         Port.script_shell_command("check-webkit-style"))
        self.assertEqual(port.prepare_changelog_command(),
                         Port.script_shell_command("prepare-ChangeLog"))
        self.assertEqual(port.build_webkit_command(),
                         Port.script_shell_command("build-webkit"))
        self.assertEqual(port.run_javascriptcore_tests_command(),
                         Port.script_shell_command("run-javascriptcore-tests"))
        self.assertEqual(port.run_webkit_unit_tests_command(), None)
        self.assertEqual(port.run_webkit_tests_command(),
                         Port.script_shell_command("run-webkit-tests"))
        self.assertEqual(port.run_python_unittests_command(),
                         Port.script_shell_command("test-webkitpy"))
        self.assertEqual(port.run_perl_unittests_command(),
                         Port.script_shell_command("test-webkitperl"))
        self.assertEqual(port.run_bindings_tests_command(),
                         Port.script_shell_command("run-bindings-tests"))
示例#2
0
 def _driver_class(self):
     if os.environ.get("DISABLE_XVFB_DRIVER"):
         return Port._driver_class(self)
     return XvfbDriver
示例#3
0
 def _driver_class(self):
     if os.environ.get("DISABLE_XVFB_DRIVER"):
         return Port._driver_class(self)
     return XvfbDriver
示例#4
0
    def test_commands(self):
        port = self.make_port(port_name="qt")
        self.assertEqual(port.tooling_flag(), "--port=qt")
        self.assertEqual(port.update_webkit_command(), Port.script_shell_command("update-webkit"))
        self.assertEqual(port.check_webkit_style_command(), Port.script_shell_command("check-webkit-style"))
        self.assertEqual(port.prepare_changelog_command(), Port.script_shell_command("prepare-ChangeLog"))
        self.assertEqual(port.build_webkit_command(), Port.script_shell_command("build-webkit") + ["--qt", "--no-webkit2", port.make_args()])
        self.assertEqual(port.run_javascriptcore_tests_command(), Port.script_shell_command("run-javascriptcore-tests"))
        self.assertEqual(port.run_webkit_unit_tests_command(), None)
        self.assertEqual(port.run_webkit_tests_command(), Port.script_shell_command("run-webkit-tests") + ["--qt"])
        self.assertEqual(port.run_python_unittests_command(), Port.script_shell_command("test-webkitpy"))
        self.assertEqual(port.run_perl_unittests_command(), Port.script_shell_command("test-webkitperl"))
        self.assertEqual(port.run_bindings_tests_command(), Port.script_shell_command("run-bindings-tests"))

        port = self.make_port(port_name="qt", options=MockOptions(webkit_test_runner=True))
        self.assertEqual(port.tooling_flag(), "--port=qt-wk2")
        self.assertEqual(port.update_webkit_command(), Port.script_shell_command("update-webkit"))
        self.assertEqual(port.check_webkit_style_command(), Port.script_shell_command("check-webkit-style"))
        self.assertEqual(port.prepare_changelog_command(), Port.script_shell_command("prepare-ChangeLog"))
        self.assertEqual(port.build_webkit_command(), Port.script_shell_command("build-webkit") + ["--qt", port.make_args()])
        self.assertEqual(port.run_javascriptcore_tests_command(), Port.script_shell_command("run-javascriptcore-tests"))
        self.assertEqual(port.run_webkit_unit_tests_command(), None)
        self.assertEqual(port.run_webkit_tests_command(), Port.script_shell_command("run-webkit-tests") + ["--qt", "-2"])
        self.assertEqual(port.run_python_unittests_command(), Port.script_shell_command("test-webkitpy"))
        self.assertEqual(port.run_perl_unittests_command(), Port.script_shell_command("test-webkitperl"))
        self.assertEqual(port.run_bindings_tests_command(), Port.script_shell_command("run-bindings-tests"))