Changeset 92708 in webkit


Ignore:
Timestamp:
Aug 9, 2011 2:21:20 PM (13 years ago)
Author:
abarth@webkit.org
Message:

Teach build.webkit.org's garden-o-matic how to talk to the local server
https://bugs.webkit.org/show_bug.cgi?id=65940

Reviewed by Dimitri Glazkov.

After this patch, the version of garden-o-matic on build.webkit.org is
fully functional. It can interact with the local server via CORS.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js:
  • Scripts/webkitpy/tool/commands/gardenomatic.py:
  • Scripts/webkitpy/tool/servers/gardeningserver.py:
Location:
trunk/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js

    r92396 r92708  
    3333{
    3434    return kWebKitTrunk + 'LayoutTests/' + testName;
    35 }
     35};
     36
     37checkout.isAvailable = function(callback)
     38{
     39    net.ajax({
     40        url: config.kLocalServerURL + '/ping',
     41        success: function() {
     42            callback(true);
     43        },
     44        error: function() {
     45            callback(false);
     46        },
     47    });
     48};
    3649
    3750checkout.updateExpectations = function(failureInfoList, callback)
    3851{
    39     net.post('/updateexpectations', JSON.stringify(failureInfoList), function() {
     52    net.post(config.kLocalServerURL + '/updateexpectations', JSON.stringify(failureInfoList), function() {
    4053        callback();
    4154    });
     
    4457checkout.optimizeBaselines = function(testName, callback)
    4558{
    46     net.post('/optimizebaselines?' + $.param({
     59    net.post(config.kLocalServerURL + '/optimizebaselines?' + $.param({
    4760        'test': testName,
    4861    }), function() {
     
    5669        var extensionList = Array.prototype.concat.apply([], failureInfo.failureTypeList.map(results.failureTypeToExtensionList));
    5770        base.callInSequence(function(extension, callback) {
    58             net.post('/rebaseline?' + $.param({
     71            net.post('config.kLocalServerURL + /rebaseline?' + $.param({
    5972                'builder': failureInfo.builderName,
    6073                'test': failureInfo.testName,
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js

    r92355 r92708  
    5757config.kTracURL = 'http://trac.webkit.org';
    5858config.kBugzillaURL = 'https://bugs.webkit.org';
     59config.kLocalServerURL = 'http://127.0.0.1:8127';
    5960
    6061config.kRevisionAttr = 'data-revision';
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js

    r92360 r92708  
    3737{
    3838    $('.butterbar').fadeOut('fast');
     39    checkForLocalServer();
    3940}
    4041
     
    285286}
    286287
     288function checkForLocalServer()
     289{
     290    checkout.isAvailable(function(available) {
     291        if (!available)
     292            displayOnButterbar('Run "webkit-patch garden-o-matic" to enable rebaseline features.')
     293    });
     294}
     295
    287296function update()
    288297{
     
    294303        model.analyzeUnexpectedFailures(showUnexpectedFailure);
    295304        dismissButterbar();
     305        checkForLocalServer();
    296306    });
    297307}
  • trunk/Tools/ChangeLog

    r92707 r92708  
     12011-08-09  Adam Barth  <abarth@webkit.org>
     2
     3        Teach build.webkit.org's garden-o-matic how to talk to the local server
     4        https://bugs.webkit.org/show_bug.cgi?id=65940
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        After this patch, the version of garden-o-matic on build.webkit.org is
     9        fully functional.  It can interact with the local server via CORS.
     10
     11        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js:
     12        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js:
     13        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js:
     14        * Scripts/webkitpy/tool/commands/gardenomatic.py:
     15        * Scripts/webkitpy/tool/servers/gardeningserver.py:
     16
    1172011-08-09  Adam Barth  <abarth@webkit.org>
    218
  • trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py

    r91519 r92708  
    2323# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424
    25 from webkitpy.tool.commands.abstractlocalservercommand import AbstractLocalServerCommand
     25from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
    2626from webkitpy.tool.servers.gardeningserver import GardeningHTTPServer
    2727
    2828
    29 class GardenOMatic(AbstractLocalServerCommand):
     29class GardenOMatic(AbstractDeclarativeCommand):
    3030    name = "garden-o-matic"
    3131    help_text = "Experimental command for gardening the WebKit tree."
    3232
    33     server = GardeningHTTPServer
    34     launch_path = "/garden-o-matic.html"
     33    url = "http://build.webkit.org/TestFailures/garden-o-matic.html"
    3534
    36     def _prepare_config(self, options, args, tool):
    37         return {
    38             'tool': tool,
    39         }
     35    def execute(self, options, args, tool):
     36        self._tool.user.open_url(self.url)
     37        httpd = GardeningHTTPServer(httpd_port=8127, config={'tool': tool})
     38        httpd.serve_forever()
  • trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py

    r92707 r92708  
    128128        self._serve_text('success')
    129129
     130    def ping(self):
     131        self._serve_text('pong')
     132
    130133    def updateexpectations(self):
    131134        self._expectations_updater().update_expectations(self._read_entity_body_as_json())
Note: See TracChangeset for help on using the changeset viewer.