Changeset 90472 in webkit
- Timestamp:
- Jul 6, 2011 11:13:59 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90469 r90472 1 2011-07-06 Eric Seidel <eric@webkit.org> 2 3 webkit-patch failure-reason does not understand NRWT results 4 https://bugs.webkit.org/show_bug.cgi?id=64006 5 6 Reviewed by Adam Barth. 7 8 Adam Barth tells me failure-reason should be deleted soon, 9 but aroben's fancy new TestFailures/ page doesn't work for 10 NRWT yet, and I needed to know when 11 third-party-cookie-relaxing started failing. 12 13 * Scripts/webkitpy/common/net/buildbot/buildbot.py: 14 * Scripts/webkitpy/tool/commands/queries.py: 15 1 16 2011-07-06 Xan Lopez <xlopez@igalia.com> 2 17 -
trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
r86445 r90472 42 42 from webkitpy.common.net.failuremap import FailureMap 43 43 from webkitpy.common.net.layouttestresults import LayoutTestResults 44 from webkitpy.common.net.networktransaction import NetworkTransaction 44 45 from webkitpy.common.net.regressionwindow import RegressionWindow 45 46 from webkitpy.common.net.testoutputset import TestOutputSet … … 47 48 from webkitpy.common.system.zipfileset import ZipFileSet 48 49 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup 50 49 51 50 52 _log = get_logger(__file__) … … 240 242 return TestOutputSet(self._builder.name(), None, ZipFileSet(self.results_zip_url()), include_expected=False) 241 243 242 def _fetch_results_html(self): 243 results_html = "%s/results.html" % (self.results_url()) 244 # FIXME: This should use NetworkTransaction's 404 handling or at least move 245 # to mechanize's to be more consistent with the rest of our code. 246 try: 247 # It seems this can return None if the url redirects and then returns 404. 248 result = urllib2.urlopen(results_html) 249 if not result: 250 return None 251 # urlopen returns a file-like object which sometimes works fine with str() 252 # but sometimes is a addinfourl object. In either case calling read() is correct. 253 return result.read() 254 except urllib2.HTTPError, error: 255 if error.code != 404: 256 raise 244 def _fetch_file_from_results(self, file_name): 245 # It seems this can return None if the url redirects and then returns 404. 246 result = urllib2.urlopen("%s/%s" % (self.results_url(), file_name)) 247 if not result: 248 return None 249 # urlopen returns a file-like object which sometimes works fine with str() 250 # but sometimes is a addinfourl object. In either case calling read() is correct. 251 return result.read() 257 252 258 253 def layout_test_results(self): 259 if not self._layout_test_results: 260 # FIXME: This should cache that the result was a 404 and stop hitting the network. 261 self._layout_test_results = LayoutTestResults.results_from_string(self._fetch_results_html()) 254 if self._layout_test_results: 255 return self._layout_test_results 256 257 # FIXME: This should cache that the result was a 404 and stop hitting the network. 258 results_file = NetworkTransaction(convert_404_to_None=True).run(lambda: self._fetch_file_from_results("full_results.json")) 259 if not results_file: 260 results_file = NetworkTransaction(convert_404_to_None=True).run(lambda: self._fetch_file_from_results("results.html")) 261 262 # results_from_string accepts either ORWT html or NRWT json. 263 self._layout_test_results = LayoutTestResults.results_from_string(results_file) 262 264 return self._layout_test_results 263 265 -
trunk/Tools/Scripts/webkitpy/tool/commands/queries.py
r89899 r90472 229 229 if not layout_test_results: 230 230 # FIXME: This could be made more user friendly. 231 print "Failed to load layout test results ; can't continue. (start revision = r%s)" % start_revision231 print "Failed to load layout test results from %s; can't continue. (start revision = r%s)" % (build.results_url(), start_revision) 232 232 return 1 233 233
Note: See TracChangeset
for help on using the changeset viewer.