[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

dpranke at chromium.org dpranke at chromium.org
Mon Feb 21 00:14:30 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 2e95405797635b82b340794394815ead392276e6
Author: dpranke at chromium.org <dpranke at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 28 23:33:27 2011 +0000

    2011-01-28  Dirk Pranke  <dpranke at chromium.org>
    
            Reviewed by Tony Chang.
    
            new-run-webkit-tests: change worker model values to
            "old-inline", "old-threads" in preparation for test_runner2 /
            multiprocessing changes.
    
            https://bugs.webkit.org/show_bug.cgi?id=53156
    
            * Scripts/webkitpy/layout_tests/layout_package/test_runner.py:
            * Scripts/webkitpy/layout_tests/port/base.py:
            * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
            * Scripts/webkitpy/layout_tests/port/mac.py:
            * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77004 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 8b9ebfa..c057e77 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -2,6 +2,22 @@
 
         Reviewed by Tony Chang.
 
+        new-run-webkit-tests: change worker model values to
+        "old-inline", "old-threads" in preparation for test_runner2 /
+        multiprocessing changes.
+
+        https://bugs.webkit.org/show_bug.cgi?id=53156
+
+        * Scripts/webkitpy/layout_tests/layout_package/test_runner.py:
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+        * Scripts/webkitpy/layout_tests/port/mac.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
+2011-01-28  Dirk Pranke  <dpranke at chromium.org>
+
+        Reviewed by Tony Chang.
+
         committers.py - add an IRC nickname for dpranke
         https://bugs.webkit.org/show_bug.cgi?id=53335
 
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
index 6c07850..b3f0828 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
@@ -731,28 +731,31 @@ class TestRunner:
             except Queue.Empty:
                 return
 
-            expected = self._expectations.matches_an_expected_result(
-                result.filename, result.type, self._options.pixel_tests)
-            result_summary.add(result, expected)
-            exp_str = self._expectations.get_expectations_string(
-                result.filename)
-            got_str = self._expectations.expectation_to_string(result.type)
-            self._printer.print_test_result(result, expected, exp_str, got_str)
-            self._printer.print_progress(result_summary, self._retrying,
-                                         self._test_files_list)
-
-            def interrupt_if_at_failure_limit(limit, count, message):
-                if limit and count >= limit:
-                    raise TestRunInterruptedException(message % count)
-
-            interrupt_if_at_failure_limit(
-                self._options.exit_after_n_failures,
-                result_summary.unexpected_failures,
-                "Aborting run since %d failures were reached")
-            interrupt_if_at_failure_limit(
-                self._options.exit_after_n_crashes_or_timeouts,
-                result_summary.unexpected_crashes_or_timeouts,
-                "Aborting run since %d crashes or timeouts were reached")
+            self._update_summary_with_result(result_summary, result)
+
+    def _update_summary_with_result(self, result_summary, result):
+        expected = self._expectations.matches_an_expected_result(
+            result.filename, result.type, self._options.pixel_tests)
+        result_summary.add(result, expected)
+        exp_str = self._expectations.get_expectations_string(
+            result.filename)
+        got_str = self._expectations.expectation_to_string(result.type)
+        self._printer.print_test_result(result, expected, exp_str, got_str)
+        self._printer.print_progress(result_summary, self._retrying,
+                                        self._test_files_list)
+
+        def interrupt_if_at_failure_limit(limit, count, message):
+            if limit and count >= limit:
+                raise TestRunInterruptedException(message % count)
+
+        interrupt_if_at_failure_limit(
+            self._options.exit_after_n_failures,
+            result_summary.unexpected_failures,
+            "Aborting run since %d failures were reached")
+        interrupt_if_at_failure_limit(
+            self._options.exit_after_n_crashes_or_timeouts,
+            result_summary.unexpected_crashes_or_timeouts,
+            "Aborting run since %d crashes or timeouts were reached")
 
     def _clobber_old_results(self):
         # Just clobber the actual test results directories since the other
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py
index 75b83a7..e2257ce 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -129,6 +129,9 @@ class Port(object):
         port."""
         return self._executive.cpu_count()
 
+    def default_worker_model(self):
+        return 'old-threads'
+
     def baseline_path(self):
         """Return the absolute path to the directory to store new baselines
         in for this port."""
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
index 5360ab3..f7aeed5 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
@@ -69,13 +69,16 @@ class ChromiumMacPort(chromium.ChromiumPort):
         return result
 
     def default_child_processes(self):
-        # FIXME: we need to run single-threaded for now. See
-        # https://bugs.webkit.org/show_bug.cgi?id=38553. Unfortunately this
-        # routine is called right before the logger is configured, so if we
-        # try to _log.warning(), it gets thrown away.
-        import sys
-        sys.stderr.write("Defaulting to one child - see https://bugs.webkit.org/show_bug.cgi?id=38553\n")
-        return 1
+        if self.get_option('worker_model') == 'old-threads':
+            # FIXME: we need to run single-threaded for now. See
+            # https://bugs.webkit.org/show_bug.cgi?id=38553. Unfortunately this
+            # routine is called right before the logger is configured, so if we
+            # try to _log.warning(), it gets thrown away.
+            import sys
+            sys.stderr.write("Defaulting to one child - see https://bugs.webkit.org/show_bug.cgi?id=38553\n")
+            return 1
+
+        return chromium.ChromiumPort.default_child_processes(self)
 
     def driver_name(self):
         """name for this port's equivalent of DumpRenderTree."""
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mac.py b/Tools/Scripts/webkitpy/layout_tests/port/mac.py
index 0622196..9c2e8b3 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mac.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/mac.py
@@ -52,7 +52,7 @@ class MacPort(WebKitPort):
         # four threads in parallel.
         # See https://bugs.webkit.org/show_bug.cgi?id=36622
         child_processes = WebKitPort.default_child_processes(self)
-        if child_processes > 4:
+        if self.get_option('worker_model') == 'old-threads' and child_processes > 4:
             return 4
         return child_processes
 
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 17b6e89..136e995 100755
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -30,8 +30,6 @@
 
 """Run layout tests."""
 
-from __future__ import with_statement
-
 import errno
 import logging
 import optparse
@@ -128,6 +126,9 @@ def _set_up_derived_options(port_obj, options):
     # We return a list of warnings to print after the printer is initialized.
     warnings = []
 
+    if options.worker_model is None:
+        options.worker_model = port_obj.default_worker_model()
+
     if options.worker_model == 'old-inline':
         if options.child_processes and int(options.child_processes) > 1:
             warnings.append("--worker-model=old-inline overrides --child-processes")
@@ -368,8 +369,8 @@ def parse_args(args=None):
             help="Number of DumpRenderTrees to run in parallel."),
         # FIXME: Display default number of child processes that will run.
         optparse.make_option("--worker-model", action="store",
-            default="old-threads", help=("controls worker model. Valid values "
-            "are 'old-inline', 'old-threads'.")),
+            default=None, help=("controls worker model. Valid values "
+                                "are 'old-inline', 'old-threads'.")),
         optparse.make_option("--experimental-fully-parallel",
             action="store_true", default=False,
             help="run all tests in parallel"),

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list