Changeset 90774 in webkit


Ignore:
Timestamp:
Jul 11, 2011 12:04:10 PM (13 years ago)
Author:
abarth@webkit.org
Message:

garden-o-matic should be able to rebaseline tests
https://bugs.webkit.org/show_bug.cgi?id=64186

Reviewed by Eric Seidel.

This patch contains a simple HTTP server binding for the
rebaseline-test command. The frontend will appear in another patch.

  • Scripts/webkitpy/tool/servers/gardeningserver.py:
  • Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
  • Scripts/webkitpy/tool/servers/reflectionhandler.py:
Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90772 r90774  
     12011-07-11  Adam Barth  <abarth@webkit.org>
     2
     3        garden-o-matic should be able to rebaseline tests
     4        https://bugs.webkit.org/show_bug.cgi?id=64186
     5
     6        Reviewed by Eric Seidel.
     7
     8        This patch contains a simple HTTP server binding for the
     9        rebaseline-test command.  The frontend will appear in another patch.
     10
     11        * Scripts/webkitpy/tool/servers/gardeningserver.py:
     12        * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
     13        * Scripts/webkitpy/tool/servers/reflectionhandler.py:
     14
    1152011-07-11  Adam Barth  <abarth@webkit.org>
    216
  • trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py

    r90762 r90774  
    6363            reason,
    6464        ])
     65        self._serve_text('success')
     66
     67    def rebaseline(self):
     68        builder = self.query['builder'][0]
     69        test = self.query['test'][0]
     70        suffix = self.query['suffix'][0]
     71        self._run_webkit_patch([
     72            'rebaseline-test',
     73            builder,
     74            test,
     75            suffix,
     76        ])
     77        self._serve_text('success')
  • trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py

    r90762 r90774  
    4747        self.server = server
    4848
     49    def _serve_text(self, text):
     50        print "== Begin Response =="
     51        print text
     52        print "== End Response =="
     53
    4954
    5055class GardeningServerTest(unittest.TestCase):
    51     def _post_to_path(self, path, expected_stderr=None):
     56    def _post_to_path(self, path, expected_stderr=None, expected_stdout=None):
    5257        handler = TestGardeningHTTPRequestHandler(MockServer())
    5358        handler.path = path
    54         OutputCapture().assert_outputs(self, handler.do_POST, expected_stderr=expected_stderr)
     59        OutputCapture().assert_outputs(self, handler.do_POST, expected_stderr=expected_stderr, expected_stdout=expected_stdout)
    5560
    56     def test_empty_state(self):
     61    def test_rollout(self):
    5762        expected_stderr = "MOCK run_command: ['echo', 'rollout', '--force-clean', '--non-interactive', '2314', 'MOCK rollout reason']\n"
    58         self._post_to_path("/rollout?revision=2314&reason=MOCK+rollout+reason", expected_stderr=expected_stderr)
     63        expected_stdout = "== Begin Response ==\nsuccess\n== End Response ==\n"
     64        self._post_to_path("/rollout?revision=2314&reason=MOCK+rollout+reason", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
     65
     66    def test_rebaseline_test(self):
     67        expected_stderr = "MOCK run_command: ['echo', 'rebaseline-test', 'MOCK builder', 'user-scripts/another-test.html', 'txt']\n"
     68        expected_stdout = "== Begin Response ==\nsuccess\n== End Response ==\n"
     69        self._post_to_path("/rebaseline?builder=MOCK+builder&test=user-scripts/another-test.html&suffix=txt", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
  • trunk/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py

    r90422 r90774  
    8787        threading.Thread(target=lambda: self.server.shutdown()).start()
    8888
    89     def _serve_text(self, html):
     89    def _serve_text(self, text):
    9090        self.send_response(200)
    9191        self.send_header("Content-type", "text/plain")
    9292        self.end_headers()
    93         self.wfile.write(html)
     93        self.wfile.write(text)
    9494
    9595    def _serve_json(self, json):
Note: See TracChangeset for help on using the changeset viewer.