[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tkent at chromium.org tkent at chromium.org
Wed Dec 22 15:26:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6189b3c001e45fa88e357f399410ae2d93877473
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 3 11:20:18 2010 +0000

    2010-11-03  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            REGRESSION: rebaseline-chromium-webkit-tests uses non-zero tolerance for
            image dup detection
            https://bugs.webkit.org/show_bug.cgi?id=48744
    
            * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:
             - Make a function for option parsing for ease of test
             - Set 0 to options.tolerance
            * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py:
             - Add a test for this change
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71228 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 501b160..0ddc5bd 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-03  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        REGRESSION: rebaseline-chromium-webkit-tests uses non-zero tolerance for
+        image dup detection
+        https://bugs.webkit.org/show_bug.cgi?id=48744
+
+        * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:
+         - Make a function for option parsing for ease of test
+         - Set 0 to options.tolerance
+        * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py:
+         - Add a test for this change
+
 2010-11-02  Gyuyoung Kim  <gyuyoung.kim at samsung.com>
 
         Unreviewed: Add myself to the list of Committers.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
index 434058e..1c23f76 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
@@ -819,9 +819,8 @@ def get_host_port_object(options):
     return port_obj
 
 
-def main(executive=Executive()):
-    """Main function to produce new baselines."""
-
+def parse_options(args):
+    """Parse options and return a pair of host options and target options."""
     option_parser = optparse.OptionParser()
     option_parser.add_option('-v', '--verbose',
                              action='store_true',
@@ -874,7 +873,20 @@ def main(executive=Executive()):
                              help=('The target platform to rebaseline '
                                    '("mac", "chromium", "qt", etc.). Defaults '
                                    'to "chromium".'))
-    options = option_parser.parse_args()[0]
+    options = option_parser.parse_args(args)[0]
+
+    target_options = copy.copy(options)
+    if options.target_platform == 'chromium':
+        target_options.chromium = True
+    options.tolerance = 0
+
+    return (options, target_options)
+
+
+def main(executive=Executive()):
+    """Main function to produce new baselines."""
+
+    (options, target_options) = parse_options(sys.argv[1:])
 
     # We need to create three different Port objects over the life of this
     # script. |target_port_obj| is used to determine configuration information:
@@ -882,9 +894,6 @@ def main(executive=Executive()):
     # |port_obj| is used for runtime functionality like actually diffing
     # Then we create a rebaselining port to actual find and manage the
     # baselines.
-    target_options = copy.copy(options)
-    if options.target_platform == 'chromium':
-        target_options.chromium = True
     target_port_obj = port.get(None, target_options)
 
     # Set up our logging format.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py
index 8db31a6..7c55b94 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py
@@ -95,6 +95,15 @@ class TestRebaseliner(unittest.TestCase):
         return rebaseline_chromium_webkit_tests.Rebaseliner(
             host_port_obj, target_port_obj, platform, options)
 
+    def test_parse_options(self):
+        (options, target_options) = rebaseline_chromium_webkit_tests.parse_options([])
+        self.assertTrue(target_options.chromium)
+        self.assertEqual(options.tolerance, 0)
+
+        (options, target_options) = rebaseline_chromium_webkit_tests.parse_options(['--target-platform', 'qt'])
+        self.assertFalse(hasattr(target_options, 'chromium'))
+        self.assertEqual(options.tolerance, 0)
+
     def test_noop(self):
         # this method tests that was can at least instantiate an object, even
         # if there is nothing to do.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list