Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js (92707 => 92708)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js 2011-08-09 21:17:42 UTC (rev 92707)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js 2011-08-09 21:21:20 UTC (rev 92708)
@@ -32,18 +32,31 @@
checkout.subversionURLForTest = function(testName)
{
return kWebKitTrunk + 'LayoutTests/' + testName;
-}
+};
+checkout.isAvailable = function(callback)
+{
+ net.ajax({
+ url: config.kLocalServerURL + '/ping',
+ success: function() {
+ callback(true);
+ },
+ error: function() {
+ callback(false);
+ },
+ });
+};
+
checkout.updateExpectations = function(failureInfoList, callback)
{
- net.post('/updateexpectations', JSON.stringify(failureInfoList), function() {
+ net.post(config.kLocalServerURL + '/updateexpectations', JSON.stringify(failureInfoList), function() {
callback();
});
};
checkout.optimizeBaselines = function(testName, callback)
{
- net.post('/optimizebaselines?' + $.param({
+ net.post(config.kLocalServerURL + '/optimizebaselines?' + $.param({
'test': testName,
}), function() {
callback();
@@ -55,7 +68,7 @@
base.callInSequence(function(failureInfo, callback) {
var extensionList = Array.prototype.concat.apply([], failureInfo.failureTypeList.map(results.failureTypeToExtensionList));
base.callInSequence(function(extension, callback) {
- net.post('/rebaseline?' + $.param({
+ net.post('config.kLocalServerURL + /rebaseline?' + $.param({
'builder': failureInfo.builderName,
'test': failureInfo.testName,
'extension': extension
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js (92707 => 92708)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js 2011-08-09 21:17:42 UTC (rev 92707)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/config.js 2011-08-09 21:21:20 UTC (rev 92708)
@@ -56,6 +56,7 @@
config.kTracURL = 'http://trac.webkit.org';
config.kBugzillaURL = 'https://bugs.webkit.org';
+config.kLocalServerURL = 'http://127.0.0.1:8127';
config.kRevisionAttr = 'data-revision';
config.kTestNameAttr = 'data-test-name';
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js (92707 => 92708)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js 2011-08-09 21:17:42 UTC (rev 92707)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js 2011-08-09 21:21:20 UTC (rev 92708)
@@ -36,6 +36,7 @@
function dismissButterbar()
{
$('.butterbar').fadeOut('fast');
+ checkForLocalServer();
}
function displayOnButterbar(message)
@@ -284,6 +285,14 @@
hideInfobarIfOfType(kBuildFailedInfobarType);
}
+function checkForLocalServer()
+{
+ checkout.isAvailable(function(available) {
+ if (!available)
+ displayOnButterbar('Run "webkit-patch garden-o-matic" to enable rebaseline features.')
+ });
+}
+
function update()
{
displayOnButterbar('Loading...');
@@ -293,6 +302,7 @@
showBuilderProgress();
model.analyzeUnexpectedFailures(showUnexpectedFailure);
dismissButterbar();
+ checkForLocalServer();
});
}
Modified: trunk/Tools/ChangeLog (92707 => 92708)
--- trunk/Tools/ChangeLog 2011-08-09 21:17:42 UTC (rev 92707)
+++ trunk/Tools/ChangeLog 2011-08-09 21:21:20 UTC (rev 92708)
@@ -1,5 +1,21 @@
2011-08-09 Adam Barth <[email protected]>
+ 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:
+
+2011-08-09 Adam Barth <[email protected]>
+
Enable CORS for garden-o-matic
https://bugs.webkit.org/show_bug.cgi?id=65936
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py (92707 => 92708)
--- trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py 2011-08-09 21:17:42 UTC (rev 92707)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py 2011-08-09 21:21:20 UTC (rev 92708)
@@ -22,18 +22,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.tool.commands.abstractlocalservercommand import AbstractLocalServerCommand
+from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
from webkitpy.tool.servers.gardeningserver import GardeningHTTPServer
-class GardenOMatic(AbstractLocalServerCommand):
+class GardenOMatic(AbstractDeclarativeCommand):
name = "garden-o-matic"
help_text = "Experimental command for gardening the WebKit tree."
- server = GardeningHTTPServer
- launch_path = "/garden-o-matic.html"
+ url = ""
- def _prepare_config(self, options, args, tool):
- return {
- 'tool': tool,
- }
+ def execute(self, options, args, tool):
+ self._tool.user.open_url(self.url)
+ httpd = GardeningHTTPServer(httpd_port=8127, config={'tool': tool})
+ httpd.serve_forever()
Modified: trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py (92707 => 92708)
--- trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py 2011-08-09 21:17:42 UTC (rev 92707)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py 2011-08-09 21:21:20 UTC (rev 92708)
@@ -127,6 +127,9 @@
])
self._serve_text('success')
+ def ping(self):
+ self._serve_text('pong')
+
def updateexpectations(self):
self._expectations_updater().update_expectations(self._read_entity_body_as_json())
self._serve_text('success')