Title: [175294] trunk/Tools
- Revision
- 175294
- Author
- [email protected]
- Date
- 2014-10-28 17:58:13 -0700 (Tue, 28 Oct 2014)
Log Message
Make runtest.py call test-webkitpy with the --json flag when in
non-interactive mode.
https://bugs.webkit.org/show_bug.cgi?id=137667
Patch by Jake Nielsen <[email protected]> on 2014-10-28
Reviewed by Daniel Bates.
* Scripts/webkitpy/port/base.py:
Adds the python_unittest_results_directory method.
(Port.python_unittest_results_directory):
* Scripts/webkitpy/tool/steps/runtests.py:
Changes RunTests to call test-webkitpy with the --json flag if the
--non-interactive flag is set.
(RunTests):
(RunTests.run):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (175293 => 175294)
--- trunk/Tools/ChangeLog 2014-10-29 00:53:53 UTC (rev 175293)
+++ trunk/Tools/ChangeLog 2014-10-29 00:58:13 UTC (rev 175294)
@@ -1,3 +1,20 @@
+2014-10-28 Jake Nielsen <[email protected]>
+
+ Make runtest.py call test-webkitpy with the --json flag when in
+ non-interactive mode.
+ https://bugs.webkit.org/show_bug.cgi?id=137667
+
+ Reviewed by Daniel Bates.
+
+ * Scripts/webkitpy/port/base.py:
+ Adds the python_unittest_results_directory method.
+ (Port.python_unittest_results_directory):
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ Changes RunTests to call test-webkitpy with the --json flag if the
+ --non-interactive flag is set.
+ (RunTests):
+ (RunTests.run):
+
2014-10-28 Rebecca Hauck <[email protected]>
import-w3c-tests should use re.escape() wherever it's handling file paths
Modified: trunk/Tools/Scripts/webkitpy/port/base.py (175293 => 175294)
--- trunk/Tools/Scripts/webkitpy/port/base.py 2014-10-29 00:53:53 UTC (rev 175293)
+++ trunk/Tools/Scripts/webkitpy/port/base.py 2014-10-29 00:58:13 UTC (rev 175294)
@@ -785,6 +785,9 @@
def perf_results_directory(self):
return self._build_path()
+ def python_unittest_results_directory(self):
+ return self._build_path('python-unittest-results')
+
def default_results_directory(self):
"""Absolute path to the default place to store the test results."""
# Results are store relative to the built products to make it easy
Modified: trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py (175293 => 175294)
--- trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py 2014-10-29 00:53:53 UTC (rev 175293)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py 2014-10-29 00:58:13 UTC (rev 175294)
@@ -32,7 +32,7 @@
import sys
from webkitpy.tool.steps.abstractstep import AbstractStep
from webkitpy.tool.steps.options import Options
-from webkitpy.common.system.executive import ScriptError
+from webkitpy.common.system.executive import ScriptError, Executive
_log = logging.getLogger(__name__)
@@ -53,7 +53,20 @@
if not self._options.test:
return
- if not self._options.non_interactive:
+ if self._options.non_interactive:
+ python_unittests_command = self._tool.deprecated_port().run_python_unittests_command()
+
+ if python_unittests_command:
+ python_unittests_command.append('--json')
+ _log.info("Running Python unit tests")
+
+ filesystem = self._tool.filesystem
+ python_unittest_results_directory = self._tool.port_factory.get().python_unittest_results_directory()
+ filesystem.maybe_make_directory(python_unittest_results_directory)
+ output = self._tool.executive.run_command(python_unittests_command, cwd=self._tool.scm().checkout_root, error_handler=Executive.ignore_error, return_stderr=False)
+ filesystem.write_text_file(filesystem.join(python_unittest_results_directory, "results.json"), output)
+
+ else:
# FIXME: We should teach the commit-queue and the EWS how to run these tests.
python_unittests_command = self._tool.deprecated_port().run_python_unittests_command()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes