Changeset 90774 in webkit
- Timestamp:
- Jul 11, 2011 12:04:10 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90772 r90774 1 2011-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 1 15 2011-07-11 Adam Barth <abarth@webkit.org> 2 16 -
trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py
r90762 r90774 63 63 reason, 64 64 ]) 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 47 47 self.server = server 48 48 49 def _serve_text(self, text): 50 print "== Begin Response ==" 51 print text 52 print "== End Response ==" 53 49 54 50 55 class 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): 52 57 handler = TestGardeningHTTPRequestHandler(MockServer()) 53 58 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) 55 60 56 def test_ empty_state(self):61 def test_rollout(self): 57 62 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 87 87 threading.Thread(target=lambda: self.server.shutdown()).start() 88 88 89 def _serve_text(self, html):89 def _serve_text(self, text): 90 90 self.send_response(200) 91 91 self.send_header("Content-type", "text/plain") 92 92 self.end_headers() 93 self.wfile.write( html)93 self.wfile.write(text) 94 94 95 95 def _serve_json(self, json):
Note: See TracChangeset
for help on using the changeset viewer.