2010-04-15 Dirk Pranke <dpranke@chromium.org>
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Apr 2010 21:01:12 +0000 (21:01 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Apr 2010 21:01:12 +0000 (21:01 +0000)
        Reviewed by Dimitri Glazkov.

        Add a way to override the user-visible name for the test binary since
        some ports don't call it DumpRenderTree (e.g., Chromium Win uses
        test_shell, Chromium Mac uses TestShell) by adding a driver_name()
        method to the Port interface.

        https://bugs.webkit.org/show_bug.cgi?id=37631

        * Scripts/webkitpy/layout_tests/port/base.py:
        * Scripts/webkitpy/layout_tests/port/chromium.py:
        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57672 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

index 02c3525..f4c3f62 100644 (file)
@@ -1,3 +1,19 @@
+2010-04-15  Dirk Pranke  <dpranke@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Add a way to override the user-visible name for the test binary since
+        some ports don't call it DumpRenderTree (e.g., Chromium Win uses
+        test_shell, Chromium Mac uses TestShell) by adding a driver_name()
+        method to the Port interface.
+
+        https://bugs.webkit.org/show_bug.cgi?id=37631
+
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
 2010-04-14  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Adam Roben.
index 8b22a95..fbd6254 100644 (file)
@@ -161,6 +161,13 @@ class Port(object):
                                     actual_filename)
         return ''.join(diff)
 
+    def driver_name(self):
+        """Returns the name of the actual binary that is performing the test,
+        so that it can be referred to in log messages. In most cases this
+        will be DumpRenderTree, but if a port uses a binary with a different
+        name, it can be overridden here."""
+        return "DumpRenderTree"
+
     def expected_baselines(self, filename, suffix, all_baselines=False):
         """Given a test name, finds where the baseline results are located.
 
index 5b90b85..b66184c 100644 (file)
@@ -113,6 +113,9 @@ class ChromiumPort(base.Port):
         return check_file_exists(image_diff_path, 'image diff exe',
                                  override_step, logging)
 
+    def driver_name(self):
+        return "test_shell"
+
     def path_from_chromium_base(self, *comps):
         """Returns the full path to path made by joining the top of the
         Chromium source tree and the list of path components in |*comps|."""
index 2d9b1a3..80b5c26 100644 (file)
@@ -66,6 +66,10 @@ class ChromiumMacPort(chromium.ChromiumPort):
                        'MacBuildInstructions')
         return result
 
+    def driver_name(self):
+        """name for this port's equivalent of DumpRenderTree."""
+        return "TestShell"
+
     def test_platform_name(self):
         # We use 'mac' instead of 'chromium-mac'
         return 'mac'
index d6e590a..eed18b0 100755 (executable)
@@ -27,7 +27,7 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-"""Run layout tests using DumpRenderTree.
+"""Run layout tests.
 
 This is a port of the existing webkit test script run-webkit-tests.
 
@@ -558,7 +558,11 @@ class TestRunner:
               in the form {filename:filename, test_run_time:test_run_time}
             result_summary: summary object to populate with the results
         """
-        self._meter.update('Starting DumpRenderTrees ...')
+        plural = ""
+        if self._options.child_processes > 1:
+            plural = "s"
+        self._meter.update('Starting %s%s ...' %
+                           (self._port.driver_name(), plural))
         threads = self._instantiate_dump_render_tree_threads(file_list,
                                                              result_summary)
 
@@ -686,8 +690,7 @@ class TestRunner:
         self._write_json_files(unexpected_results, result_summary,
                              individual_test_timings)
 
-        # Write the summary to disk (results.html) and maybe open the
-        # DumpRenderTree to this file.
+        # Write the summary to disk (results.html) and display it if requested.
         wrote_results = self._write_results_html_file(result_summary)
         if not self._options.noshow_results and wrote_results:
             self._show_results_html_file()
@@ -1436,7 +1439,11 @@ def main(options, args, print_results=True):
         options.child_processes = port_obj.default_child_processes()
 
     write = create_logging_writer(options, 'config')
-    write("Running %s DumpRenderTrees in parallel" % options.child_processes)
+    if options.child_processes == 1:
+        write("Running one %s" % port_obj.driver_name)
+    else:
+        write("Running %s %ss in parallel" % (
+              options.child_processes, port_obj.driver_name()))
 
     if not options.time_out_ms:
         if options.configuration == "Debug":