Changeset 65979 in webkit
- Timestamp:
- Aug 24, 2010 10:11:56 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r65978 r65979 1 2010-08-24 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 commit-queue and EWS bots should report all failures 6 https://bugs.webkit.org/show_bug.cgi?id=41820 7 8 Right now commit-queue/EWS only report failures when the 9 patch under testing fails. We should report all failures 10 to the status server so that we can diagnose when the bots 11 are wedged w/o needing to log into the machines. 12 13 I also reduced the amount of data we upload since we've seen 14 timeouts during status upload. 15 16 * Scripts/webkitpy/common/system/executive.py: 17 * Scripts/webkitpy/tool/commands/earlywarningsystem.py: 18 * Scripts/webkitpy/tool/commands/queues.py: 19 * Scripts/webkitpy/tool/commands/queues_unittest.py: 20 1 21 2010-08-24 Eric Seidel <eric@webkit.org> 2 22 -
trunk/WebKitTools/Scripts/webkitpy/common/system/executive.py
r63041 r65979 74 74 if self.output: 75 75 if output_limit and len(self.output) > output_limit: 76 return "%s\nLast %s characters of output:\n%s" % \76 return u"%s\nLast %s characters of output:\n%s" % \ 77 77 (self, output_limit, self.output[-output_limit:]) 78 return "%s\n%s" % (self, self.output)79 return str(self)78 return u"%s\n%s" % (self, self.output) 79 return unicode(self) 80 80 81 81 def command_name(self): -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
r64995 r65979 56 56 return True 57 57 except ScriptError, e: 58 self._update_status("Unable to perform a build") 58 failure_log = self._log_from_script_error_for_upload(e) 59 self._update_status("Unable to perform a build", results_file=failure_log) 59 60 return False 60 61 -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
r62923 r65979 121 121 122 122 @classmethod 123 def _log_from_script_error_for_upload(cls, script_error, output_limit=None): 124 # We have seen request timeouts with app engine due to large 125 # log uploads. Trying only the last 512k. 126 if not output_limit: 127 output_limit = 512 * 1024 # 512k 128 output = script_error.message_with_output(output_limit=output_limit) 129 # We pre-encode the string to a byte array before passing it 130 # to status_server, because ClientForm (part of mechanize) 131 # wants a file-like object with pre-encoded data. 132 return StringIO(output.encode("utf-8")) 133 134 @classmethod 123 135 def _update_status_for_script_error(cls, tool, state, script_error, is_error=False): 124 136 message = str(script_error) 125 137 if is_error: 126 138 message = "Error: %s" % message 127 output = script_error.message_with_output(output_limit=1024*1024) # 1MB 128 # We pre-encode the string to a byte array before passing it 129 # to status_server, because ClientForm (part of mechanize) 130 # wants a file-like object with pre-encoded data. 131 return tool.status_server.update_status(cls.name, message, state["patch"], StringIO(output.encode("utf-8"))) 139 failure_log = cls._log_from_script_error_for_upload(script_error) 140 return tool.status_server.update_status(cls.name, message, state["patch"], failure_log) 132 141 133 142 … … 204 213 "--quiet"]) 205 214 except ScriptError, e: 206 self._update_status("Unable to successfully build and test", None) 215 failure_log = self._log_from_script_error_for_upload(e) 216 self._update_status("Unable to successfully build and test", results_file=failure_log) 207 217 return False 208 218 return True -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
r61831 r65979 100 100 self.assertTrue(queue.should_continue_work_queue()) 101 101 102 def _assert_log_message(self, script_error, log_message): 103 failure_log = AbstractQueue._log_from_script_error_for_upload(script_error, output_limit=10) 104 self.assertTrue(failure_log.read(), log_message) 105 106 def test_log_from_script_error_for_upload(self): 107 self._assert_log_message(ScriptError("test"), "test") 108 unicode_tor = u"WebKit \u2661 Tor Arne Vestb\u00F8!" 109 utf8_tor = unicode_tor.encode("utf-8") 110 self._assert_log_message(ScriptError(unicode_tor), utf8_tor) 111 script_error = ScriptError(unicode_tor, output=unicode_tor) 112 expected_output = "%s\nLast %s characters of output:\n%s" % (utf8_tor, 10, utf8_tor[-10:]) 113 self._assert_log_message(script_error, expected_output) 114 102 115 103 116 class AbstractReviewQueueTest(CommandsTest):
Note: See TracChangeset
for help on using the changeset viewer.