Title: [175295] trunk/Tools
- Revision
- 175295
- Author
- dba...@webkit.org
- Date
- 2014-10-28 18:28:33 -0700 (Tue, 28 Oct 2014)
Log Message
Unify logic in RunTests.run() to run the Python unit tests
https://bugs.webkit.org/show_bug.cgi?id=138160
Reviewed by Martin Robinson.
Unify the interactive and non-interactive code path for running the Python unit tests
in step RunTests so as to remove duplicate code to compute the the path to the script
test-webkitpy and log an informative message ("Running Python unit tests") to the console.
No new tests since no functionality was changed.
* Scripts/webkitpy/port/base.py:
(Port.python_unittest_results_directory):
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (175294 => 175295)
--- trunk/Tools/ChangeLog 2014-10-29 00:58:13 UTC (rev 175294)
+++ trunk/Tools/ChangeLog 2014-10-29 01:28:33 UTC (rev 175295)
@@ -1,3 +1,21 @@
+2014-10-28 Daniel Bates <daba...@apple.com>
+
+ Unify logic in RunTests.run() to run the Python unit tests
+ https://bugs.webkit.org/show_bug.cgi?id=138160
+
+ Reviewed by Martin Robinson.
+
+ Unify the interactive and non-interactive code path for running the Python unit tests
+ in step RunTests so as to remove duplicate code to compute the the path to the script
+ test-webkitpy and log an informative message ("Running Python unit tests") to the console.
+
+ No new tests since no functionality was changed.
+
+ * Scripts/webkitpy/port/base.py:
+ (Port.python_unittest_results_directory):
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+
2014-10-28 Jake Nielsen <jacob_niel...@apple.com>
Make runtest.py call test-webkitpy with the --json flag when in
Modified: trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py (175294 => 175295)
--- trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py 2014-10-29 00:58:13 UTC (rev 175294)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py 2014-10-29 01:28:33 UTC (rev 175295)
@@ -53,27 +53,23 @@
if not self._options.test:
return
- 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")
-
+ python_unittests_command = self._tool.deprecated_port().run_python_unittests_command()
+ if python_unittests_command:
+ _log.info("Running Python unit tests")
+ if self._options.non_interactive:
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)
+
+ python_unittests_command.append('--json')
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:
+ self._tool.executive.run_and_throw_if_fail(python_unittests_command, cwd=self._tool.scm().checkout_root)
- else:
+ if not self._options.non_interactive:
# 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()
- if python_unittests_command:
- _log.info("Running Python unit tests")
- self._tool.executive.run_and_throw_if_fail(python_unittests_command, cwd=self._tool.scm().checkout_root)
-
perl_unittests_command = self._tool.deprecated_port().run_perl_unittests_command()
if perl_unittests_command:
_log.info("Running Perl unit tests")
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes