[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:36:04 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit bc6e0b35c6e30a8c5ece2ddfc6151beada859ba2
Author: dpranke at chromium.org <dpranke at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 2 01:16:29 2011 +0000

    2011-02-01  Dirk Pranke  <dpranke at chromium.org>
    
            Reviewed by Tony Chang.
    
            new-run-webkit-tests: add first stub of test_runner2. This
            will add support for the 'inline', 'threads', and 'processes'
            flags to --worker-model, but for now the implementatios just
            fall back on the old ones.
    
            https://bugs.webkit.org/show_bug.cgi?id=53157
    
            * Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:
            * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77341 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index d5e1f6b..0a50e83 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,17 @@
+2011-02-01  Dirk Pranke  <dpranke at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        new-run-webkit-tests: add first stub of test_runner2. This
+        will add support for the 'inline', 'threads', and 'processes'
+        flags to --worker-model, but for now the implementatios just
+        fall back on the old ones.
+
+        https://bugs.webkit.org/show_bug.cgi?id=53157
+
+        * Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
 2011-02-01  Mihai Parparita  <mihaip at chromium.org>
 
         Reviewed by James Robinson.
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py
new file mode 100644
index 0000000..eb78752
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+# Copyright (C) 2011 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+The TestRunner2 package is an alternate implementation of the TestRunner
+class. For now it is just a stub, but eventually it will use the
+message broker abstraction to pass messages to workers to run sets of
+tests and then process the completion messages accordingly.
+"""
+
+import logging
+
+import test_runner
+
+_log = logging.getLogger(__name__)
+
+
+class TestRunner2(test_runner.TestRunner):
+    def __init__(self, port, options, printer):
+
+        # FIXME: This'll get replaced with a real implementation soon enough.
+        if options.worker_model in ('inline', 'threads'):
+            options.worker_model = 'old-' + options.worker_model
+        if options.worker_model == 'processes':
+            raise ValueError("--worker-model=processes not supported yet")
+
+        test_runner.TestRunner.__init__(self, port, options, printer)
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 074d9c4..1971d54 100755
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -39,6 +39,7 @@ import sys
 
 from layout_package import printing
 from layout_package import test_runner
+from layout_package import test_runner2
 
 from webkitpy.common.system import user
 from webkitpy.thirdparty import simplejson
@@ -87,7 +88,11 @@ def run(port, options, args, regular_output=sys.stderr,
     # in a try/finally to ensure that we clean up the logging configuration.
     num_unexpected_results = -1
     try:
-        runner = test_runner.TestRunner(port, options, printer)
+        if options.worker_model in ('inline', 'threads', 'processes'):
+            runner = test_runner2.TestRunner2(port, options, printer)
+        else:
+            runner = test_runner.TestRunner(port, options, printer)
+
         runner._print_config()
 
         printer.print_update("Collecting tests ...")
@@ -129,9 +134,9 @@ def _set_up_derived_options(port_obj, options):
     if options.worker_model is None:
         options.worker_model = port_obj.default_worker_model()
 
-    if options.worker_model == 'old-inline':
+    if options.worker_model in ('inline', 'old-inline'):
         if options.child_processes and int(options.child_processes) > 1:
-            warnings.append("--worker-model=old-inline overrides --child-processes")
+            warnings.append("--worker-model=%s overrides --child-processes" % options.worker_model)
         options.child_processes = "1"
     if not options.child_processes:
         options.child_processes = os.environ.get("WEBKIT_TEST_CHILD_PROCESSES",
@@ -369,8 +374,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=None, help=("controls worker model. Valid values "
-                                "are 'old-inline', 'old-threads'.")),
+            default=None, help=("controls worker model. Valid values are 'old-inline', "
+                                "'old-threads', 'inline', 'threads', and 'processes'.")),
         optparse.make_option("--experimental-fully-parallel",
             action="store_true", default=False,
             help="run all tests in parallel"),
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
index 112e402..fff3577 100644
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -452,11 +452,26 @@ class MainTest(unittest.TestCase):
         self.assertEqual(None, test_port.tolerance_used_for_diff_image)
 
     def test_worker_model__inline(self):
+        self.assertTrue(passing_run(['--worker-model', 'inline']))
+
+    def test_worker_model__old_inline_with_child_processes(self):
+        res, out, err, user = logging_run(['--worker-model', 'old-inline',
+                                           '--child-processes', '2'])
+        self.assertEqual(res, 0)
+        self.assertTrue('--worker-model=old-inline overrides --child-processes\n' in err.get())
+
+    def test_worker_model__old_inline(self):
         self.assertTrue(passing_run(['--worker-model', 'old-inline']))
 
-    def test_worker_model__threads(self):
+    def test_worker_model__old_threads(self):
         self.assertTrue(passing_run(['--worker-model', 'old-threads']))
 
+    def test_worker_model__processes(self):
+        self.assertRaises(ValueError, logging_run, ['--worker-model', 'processes'])
+
+    def test_worker_model__threads(self):
+        self.assertTrue(passing_run(['--worker-model', 'threads']))
+
     def test_worker_model__unknown(self):
         self.assertRaises(ValueError, logging_run,
                           ['--worker-model', 'unknown'])

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list