Add support for webkitpy tests EWS
[WebKit-https.git] / Tools / Scripts / webkitpy / tool / steps / runtests.py
index c8359d2..f45da55 100644 (file)
@@ -70,6 +70,10 @@ class RunTests(AbstractStep):
             self._run_bindings_tests()
             return
 
+        if self._options.group == "webkitpy":
+            self._run_webkitpy_tests()
+            return
+
         if self._options.iterate_on_new_tests:
             _log.info("Running run-webkit-tests on new tests")
             self._run_webkit_tests(self._options.iterate_on_new_tests)
@@ -165,6 +169,14 @@ class RunTests(AbstractStep):
         args.append("--json-output=%s" % results_file_path)
         self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
 
+    def _run_webkitpy_tests(self):
+        args = self._tool.deprecated_port().run_python_unittests_command()
+        results_directory = self._tool.port_factory.get(options=self._options).python_unittest_results_directory()
+        self._tool.filesystem.maybe_make_directory(results_directory)
+        results_file_path = self._tool.filesystem.join(results_directory, "webkitpy_test_results.json")
+        args.append("--json-output={}".format(results_file_path))
+        self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
+
     def _run_api_tests(self):
         args = self._tool.deprecated_port().run_api_tests_command(self._options.build_style)
         results_directory = self._tool.port_factory.get(options=self._options).api_results_directory()