Title: [121724] trunk/Tools
Revision
121724
Author
[email protected]
Date
2012-07-02 20:36:05 -0700 (Mon, 02 Jul 2012)

Log Message

webkit-patch rebaseline-expectations should share code with rebaseline-all
https://bugs.webkit.org/show_bug.cgi?id=90413

Reviewed by Dirk Pranke.

Make them share code. In addition to reducing code duplication this makes
rebaseline-expectations considerably faster by rebaselining in parallel.

* Scripts/webkitpy/tool/commands/rebaseline.py:
(AbstractParallelRebaselineCommand):
(AbstractParallelRebaselineCommand._run_webkit_patch):
(AbstractParallelRebaselineCommand._rebaseline):
(RebaselineJson):
(RebaselineJson.execute):
(RebaselineExpectations):
(RebaselineExpectations._update_expectations_file):
(RebaselineExpectations._tests_to_rebaseline):
(RebaselineExpectations._add_tests_to_rebaseline_for_port):
(RebaselineExpectations.execute):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(test_rebaseline_all):
(test_rebaseline_expectations.run_in_parallel):
(test_rebaseline_expectations):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (121723 => 121724)


--- trunk/Tools/ChangeLog	2012-07-03 03:23:43 UTC (rev 121723)
+++ trunk/Tools/ChangeLog	2012-07-03 03:36:05 UTC (rev 121724)
@@ -1,3 +1,29 @@
+2012-07-02  Ojan Vafai  <[email protected]>
+
+        webkit-patch rebaseline-expectations should share code with rebaseline-all
+        https://bugs.webkit.org/show_bug.cgi?id=90413
+
+        Reviewed by Dirk Pranke.
+
+        Make them share code. In addition to reducing code duplication this makes
+        rebaseline-expectations considerably faster by rebaselining in parallel.
+
+        * Scripts/webkitpy/tool/commands/rebaseline.py:
+        (AbstractParallelRebaselineCommand):
+        (AbstractParallelRebaselineCommand._run_webkit_patch):
+        (AbstractParallelRebaselineCommand._rebaseline):
+        (RebaselineJson):
+        (RebaselineJson.execute):
+        (RebaselineExpectations):
+        (RebaselineExpectations._update_expectations_file):
+        (RebaselineExpectations._tests_to_rebaseline):
+        (RebaselineExpectations._add_tests_to_rebaseline_for_port):
+        (RebaselineExpectations.execute):
+        * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+        (test_rebaseline_all):
+        (test_rebaseline_expectations.run_in_parallel):
+        (test_rebaseline_expectations):
+
 2012-07-02  Xiaobo Wang  <[email protected]>
 
         [BlackBerry] Update DumpRenderTree to have it work interactively in parallel

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py (121723 => 121724)


--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py	2012-07-03 03:23:43 UTC (rev 121723)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py	2012-07-03 03:36:05 UTC (rev 121724)
@@ -239,10 +239,7 @@
             self._analyze_baseline(test_name)
 
 
-class RebaselineExpectations(AbstractDeclarativeCommand):
-    name = "rebaseline-expectations"
-    help_text = "Rebaselines the tests indicated in TestExpectations."
-
+class AbstractParallelRebaselineCommand(AbstractDeclarativeCommand):
     def __init__(self):
         options = [
             optparse.make_option('--no-optimize', dest='optimize', action='', default=True,
@@ -258,60 +255,6 @@
         except ScriptError, e:
             _log.error(e)
 
-    def _update_expectations_file(self, port_name):
-        port = self._tool.port_factory.get(port_name)
-
-        # FIXME: This will intentionally skip over any REBASELINE expectations that were in an overrides file.
-        # This is not good, but avoids having the overrides getting written into the main file.
-        # See https://bugs.webkit.org/show_bug.cgi?id=88456 for context. This will no longer be needed
-        # once we properly support cascading expectations files.
-        expectations = TestExpectations(port, include_overrides=False)
-        path = port.path_to_test_expectations_file()
-        self._tool.filesystem.write_text_file(path, expectations.remove_rebaselined_tests(expectations.get_rebaselining_failures()))
-
-    def _tests_to_rebaseline(self, port):
-        tests_to_rebaseline = {}
-        expectations = TestExpectations(port, include_overrides=True)
-        for test in expectations.get_rebaselining_failures():
-            tests_to_rebaseline[test] = suffixes_for_expectations(expectations.get_expectations(test))
-        return tests_to_rebaseline
-
-    def _rebaseline_port(self, port_name):
-        builder_name = builders.builder_name_for_port_name(port_name)
-        if not builder_name:
-            return
-        tests = self._tests_to_rebaseline(self._tool.port_factory.get(port_name)).items()
-        if tests:
-            _log.info("Retrieving results for %s from %s." % (port_name, builder_name))
-        for test_name, suffixes in tests:
-            self._touched_tests.setdefault(test_name, set()).update(set(suffixes))
-            _log.info("    %s (%s)" % (test_name, ','.join(suffixes)))
-            # FIXME: we should use executive.run_in_parallel() to speed this up.
-            self._run_webkit_patch(['rebaseline-test', '--suffixes', ','.join(suffixes), builder_name, test_name])
-
-    def execute(self, options, args, tool):
-        self._touched_tests = {}
-        for port_name in tool.port_factory.all_port_names():
-            self._rebaseline_port(port_name)
-        for port_name in tool.port_factory.all_port_names():
-            self._update_expectations_file(port_name)
-        if not options.optimize:
-            return
-        for test_name, suffixes in self._touched_tests.iteritems():
-            _log.info("Optimizing baselines for %s (%s)." % (test_name, ','.join(suffixes)))
-            self._run_webkit_patch(['optimize-baselines', '--suffixes', ','.join(suffixes), test_name])
-
-
-class RebaselineAll(AbstractDeclarativeCommand):
-    name = "rebaseline-all"
-    help_text = "Rebaseline based off JSON passed to stdin. Intended to only be called from other scripts."
-
-    def _run_webkit_patch(self, args):
-        try:
-            self._tool.executive.run_command([self._tool.path()] + args, cwd=self._tool.scm().checkout_root)
-        except ScriptError, e:
-            _log.error(e)
-
     def _builders_to_fetch_from(self, builders):
         # This routine returns the subset of builders that will cover all of the baseline search paths
         # used in the input list. In particular, if the input list contains both Release and Debug
@@ -362,21 +305,74 @@
                 all_suffixes.update(test_list[test][builder])
             self._run_webkit_patch(['optimize-baselines', '--suffixes', ','.join(all_suffixes), test])
 
-    def _rebaseline(self, json_input):
-        test_list = json.loads(json_input)
-
+    def _rebaseline(self, options, test_list):
         commands = self._rebaseline_commands(test_list)
         command_results = self._tool.executive.run_in_parallel(commands)
 
         files_to_add = self._files_to_add(command_results)
         self._tool.scm().add_list(list(files_to_add))
 
-        self._optimize_baselines(test_list)
+        if options.optimize:
+            self._optimize_baselines(test_list)
 
+
+class RebaselineJson(AbstractParallelRebaselineCommand):
+    name = "rebaseline-json"
+    help_text = "Rebaseline based off JSON passed to stdin. Intended to only be called from other scripts."
+
     def execute(self, options, args, tool):
-        self._rebaseline(sys.stdin.read())
+        self._rebaseline(options, json.loads(sys.stdin.read()))
 
 
+class RebaselineExpectations(AbstractParallelRebaselineCommand):
+    name = "rebaseline-expectations"
+    help_text = "Rebaselines the tests indicated in TestExpectations."
+
+    def _update_expectations_file(self, port_name):
+        port = self._tool.port_factory.get(port_name)
+
+        # FIXME: This will intentionally skip over any REBASELINE expectations that were in an overrides file.
+        # This is not good, but avoids having the overrides getting written into the main file.
+        # See https://bugs.webkit.org/show_bug.cgi?id=88456 for context. This will no longer be needed
+        # once we properly support cascading expectations files.
+        expectations = TestExpectations(port, include_overrides=False)
+        path = port.path_to_test_expectations_file()
+        self._tool.filesystem.write_text_file(path, expectations.remove_rebaselined_tests(expectations.get_rebaselining_failures()))
+
+    def _tests_to_rebaseline(self, port):
+        tests_to_rebaseline = {}
+        expectations = TestExpectations(port, include_overrides=True)
+        for test in expectations.get_rebaselining_failures():
+            tests_to_rebaseline[test] = suffixes_for_expectations(expectations.get_expectations(test))
+        return tests_to_rebaseline
+
+    def _add_tests_to_rebaseline_for_port(self, port_name):
+        builder_name = builders.builder_name_for_port_name(port_name)
+        if not builder_name:
+            return
+        tests = self._tests_to_rebaseline(self._tool.port_factory.get(port_name)).items()
+
+        if tests:
+            _log.info("Retrieving results for %s from %s." % (port_name, builder_name))
+
+        for test_name, suffixes in tests:
+            _log.info("    %s (%s)" % (test_name, ','.join(suffixes)))
+            if test_name not in self._test_list:
+                self._test_list[test_name] = {}
+            self._test_list[test_name][builder_name] = suffixes
+
+    def execute(self, options, args, tool):
+        self._test_list = {}
+        for port_name in tool.port_factory.all_port_names():
+            self._add_tests_to_rebaseline_for_port(port_name)
+        self._rebaseline(options, self._test_list)
+
+        for port_name in tool.port_factory.all_port_names():
+            self._update_expectations_file(port_name)
+
+
+# FIXME: Merge this with rebaseline-test. The only difference is that this prompts if you leave out the test-name, builder or suffixes.
+# We should just make rebaseline-test prompt and get rid of this command.
 class Rebaseline(AbstractDeclarativeCommand):
     name = "rebaseline"
     help_text = "Replaces local expected.txt files with new results from build bots"

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py (121723 => 121724)


--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py	2012-07-03 03:23:43 UTC (rev 121723)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py	2012-07-03 03:36:05 UTC (rev 121724)
@@ -196,25 +196,27 @@
             "MOCK builder (Debug)": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier", "debug"])},
         }
 
-        command = RebaselineAll()
+        command = RebaselineJson()
         tool = MockTool()
+        options = MockOptions()
+        options.optimize = True
         command.bind_to_tool(tool)
         tool.executive = MockExecutive(should_log=True)
 
-        expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', u'txt,png', u'MOCK builder', u'user-scripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', u'txt,png', u'user-scripts/another-test.html'], cwd=/mock-checkout
+        expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt,png', 'MOCK builder', 'user-scripts/another-test.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt,png', 'user-scripts/another-test.html'], cwd=/mock-checkout
 """
-        OutputCapture().assert_outputs(self, command._rebaseline, ['{"user-scripts/another-test.html":{"MOCK builder": ["txt","png"]}}'], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, command._rebaseline, [options, {"user-scripts/another-test.html":{"MOCK builder": ["txt", "png"]}}], expected_stderr=expected_stderr)
 
-        expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', u'txt,png', u'MOCK builder (Debug)', u'user-scripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', u'txt,png', u'user-scripts/another-test.html'], cwd=/mock-checkout
+        expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt,png', 'MOCK builder (Debug)', 'user-scripts/another-test.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt,png', 'user-scripts/another-test.html'], cwd=/mock-checkout
 """
-        OutputCapture().assert_outputs(self, command._rebaseline, ['{"user-scripts/another-test.html":{"MOCK builder (Debug)": ["txt","png"]}}'], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, command._rebaseline, [options, {"user-scripts/another-test.html":{"MOCK builder (Debug)": ["txt", "png"]}}], expected_stderr=expected_stderr)
 
-        expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', u'txt', u'MOCK builder', u'user-scripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', u'txt', u'user-scripts/another-test.html'], cwd=/mock-checkout
+        expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'MOCK builder', 'user-scripts/another-test.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt', 'user-scripts/another-test.html'], cwd=/mock-checkout
 """
-        OutputCapture().assert_outputs(self, command._rebaseline, ['{"user-scripts/another-test.html":{"MOCK builder (Debug)": ["txt","png"], "MOCK builder": ["txt"]}}'], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, command._rebaseline, [options, {"user-scripts/another-test.html":{"MOCK builder (Debug)": ["txt", "png"], "MOCK builder": ["txt"]}}], expected_stderr=expected_stderr)
 
         builders._exact_matches = old_exact_matches
 
@@ -231,6 +233,12 @@
         # Don't enable logging until after we create the mock expectation files as some Port.__init__'s run subcommands.
         tool.executive = MockExecutive(should_log=True)
 
+        def run_in_parallel(commands):
+            print commands
+            return ""
+
+        tool.executive.run_in_parallel = run_in_parallel
+
         expected_logs = """Retrieving results for chromium-linux-x86 from Webkit Linux 32.
     userscripts/another-test.html (txt)
     userscripts/images.svg (png)
@@ -266,46 +274,34 @@
     userscripts/images.svg (png)
 """
 
-        expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'Webkit Linux 32', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'Webkit Linux 32', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'Webkit Linux', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'Webkit Linux', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'Webkit Mac10.7', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'Webkit Mac10.7', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'Webkit Mac10.6', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'Webkit Mac10.6', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'Webkit Win7', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'Webkit Win7', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'Webkit Win', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'Webkit Win', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'EFL Linux 64-bit Release', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'EFL Linux 64-bit Release', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'GTK Linux 64-bit Release', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'GTK Linux 64-bit Release', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'Apple Lion Release WK1 (Tests)', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'Apple Lion Release WK1 (Tests)', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'Qt Linux Release', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'Qt Linux Release', 'userscripts/images.svg'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt', 'Apple Win 7 Release (Tests)', 'userscripts/another-test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'png', 'Apple Win 7 Release (Tests)', 'userscripts/images.svg'], cwd=/mock-checkout
+        expected_stdout = """[(['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Linux 32', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Linux', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Mac10.6', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Mac10.7', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Win7', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Apple Win 7 Release (Tests)', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'EFL Linux 64-bit Release', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Win', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'GTK Linux 64-bit Release', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Qt Linux Release', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Apple Lion Release WK1 (Tests)', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Linux 32', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Linux', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Mac10.6', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Mac10.7', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Win7', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Apple Win 7 Release (Tests)', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'EFL Linux 64-bit Release', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Win', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'GTK Linux 64-bit Release', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Qt Linux Release', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Apple Lion Release WK1 (Tests)', 'userscripts/images.svg'], '/mock-checkout')]
+"""
+
+        expected_stderr = """MOCK run_command: ['qmake', '-v'], cwd=None
 MOCK run_command: ['qmake', '-v'], cwd=None
 MOCK run_command: ['qmake', '-v'], cwd=None
 MOCK run_command: ['qmake', '-v'], cwd=None
 MOCK run_command: ['qmake', '-v'], cwd=None
+MOCK run_command: ['qmake', '-v'], cwd=None
 """
 
         command._tests_to_rebaseline = lambda port: {'userscripts/another-test.html': set(['txt']), 'userscripts/images.svg': set(['png'])}
-        OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=False), [], tool], expected_logs=expected_logs, expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=False), [], tool], expected_logs=expected_logs, expected_stdout=expected_stdout, expected_stderr=expected_stderr)
 
-        expected_logs_with_optimize = expected_logs + (
-            "Optimizing baselines for userscripts/another-test.html (txt).\n"
-            "Optimizing baselines for userscripts/images.svg (png).\n")
-        expected_stderr_with_optimize = expected_stderr + (
-            "MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt', 'userscripts/another-test.html'], cwd=/mock-checkout\n"
-            "MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'png', 'userscripts/images.svg'], cwd=/mock-checkout\n")
+        expected_stderr_with_optimize = """MOCK run_command: ['qmake', '-v'], cwd=None
+MOCK run_command: ['qmake', '-v'], cwd=None
+MOCK run_command: ['qmake', '-v'], cwd=None
+MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt', 'userscripts/another-test.html'], cwd=/mock-checkout
+MOCK run_command: ['qmake', '-v'], cwd=None
+MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'png', 'userscripts/images.svg'], cwd=/mock-checkout
+MOCK run_command: ['qmake', '-v'], cwd=None
+MOCK run_command: ['qmake', '-v'], cwd=None
+MOCK run_command: ['qmake', '-v'], cwd=None
+MOCK run_command: ['qmake', '-v'], cwd=None
+"""
 
         command._tests_to_rebaseline = lambda port: {'userscripts/another-test.html': set(['txt']), 'userscripts/images.svg': set(['png'])}
-        OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True), [], tool], expected_logs=expected_logs_with_optimize, expected_stderr=expected_stderr_with_optimize)
+        OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True), [], tool], expected_logs=expected_logs, expected_stdout=expected_stdout, expected_stderr=expected_stderr_with_optimize)
 
     def test_overrides_are_included_correctly(self):
         command = RebaselineExpectations()

Modified: trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py (121723 => 121724)


--- trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py	2012-07-03 03:23:43 UTC (rev 121723)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py	2012-07-03 03:36:05 UTC (rev 121724)
@@ -141,6 +141,6 @@
         self._serve_text('success')
 
     def rebaselineall(self):
-        command = ['rebaseline-all']
+        command = ['rebaseline-json']
         self.server.tool.executive.run_command([self.server.tool.path()] + command, input=self.read_entity_body(), cwd=self.server.tool.scm().checkout_root)
         self._serve_text('success')

Modified: trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py (121723 => 121724)


--- trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py	2012-07-03 03:23:43 UTC (rev 121723)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py	2012-07-03 03:36:05 UTC (rev 121724)
@@ -183,7 +183,7 @@
         self._post_to_path("/rollout?revision=2314&reason=MOCK+rollout+reason", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
 
     def test_rebaselineall(self):
-        expected_stderr = "MOCK run_command: ['echo', 'rebaseline-all'], cwd=/mock-checkout, input={\"user-scripts/another-test.html\":{\"%s\": [%s]}}\n"
+        expected_stderr = "MOCK run_command: ['echo', 'rebaseline-json'], cwd=/mock-checkout, input={\"user-scripts/another-test.html\":{\"%s\": [%s]}}\n"
         expected_stdout = "== Begin Response ==\nsuccess\n== End Response ==\n"
         server = MockServer()
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to