Changeset 90472 in webkit


Ignore:
Timestamp:
Jul 6, 2011 11:13:59 AM (13 years ago)
Author:
eric@webkit.org
Message:

2011-07-06 Eric Seidel <eric@webkit.org>

webkit-patch failure-reason does not understand NRWT results
https://bugs.webkit.org/show_bug.cgi?id=64006

Reviewed by Adam Barth.

Adam Barth tells me failure-reason should be deleted soon,
but aroben's fancy new TestFailures/ page doesn't work for
NRWT yet, and I needed to know when
third-party-cookie-relaxing started failing.

  • Scripts/webkitpy/common/net/buildbot/buildbot.py:
  • Scripts/webkitpy/tool/commands/queries.py:
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90469 r90472  
     12011-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
    1162011-07-06  Xan Lopez  <xlopez@igalia.com>
    217
  • trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py

    r86445 r90472  
    4242from webkitpy.common.net.failuremap import FailureMap
    4343from webkitpy.common.net.layouttestresults import LayoutTestResults
     44from webkitpy.common.net.networktransaction import NetworkTransaction
    4445from webkitpy.common.net.regressionwindow import RegressionWindow
    4546from webkitpy.common.net.testoutputset import TestOutputSet
     
    4748from webkitpy.common.system.zipfileset import ZipFileSet
    4849from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
     50
    4951
    5052_log = get_logger(__file__)
     
    240242        return TestOutputSet(self._builder.name(), None, ZipFileSet(self.results_zip_url()), include_expected=False)
    241243
    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()
    257252
    258253    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)
    262264        return self._layout_test_results
    263265
  • trunk/Tools/Scripts/webkitpy/tool/commands/queries.py

    r89899 r90472  
    229229        if not layout_test_results:
    230230            # FIXME: This could be made more user friendly.
    231             print "Failed to load layout test results; can't continue. (start revision = r%s)" % start_revision
     231            print "Failed to load layout test results from %s; can't continue. (start revision = r%s)" % (build.results_url(), start_revision)
    232232            return 1
    233233
Note: See TracChangeset for help on using the changeset viewer.