Changeset 95069 in webkit
- Timestamp:
- Sep 13, 2011 6:24:36 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js
r95066 r95069 30 30 var kWebKitTrunk = 'http://svn.webkit.org/repository/webkit/trunk/'; 31 31 32 var g_unavailableCheckoutCallback = null;33 32 var g_haveSeenCheckoutAvailable = false; 34 33 35 function callIfCheckoutAvailable(callback )34 function callIfCheckoutAvailable(callback, checkoutUnavailable) 36 35 { 37 36 if (g_haveSeenCheckoutAvailable) { … … 45 44 return; 46 45 } 47 if ( g_unavailableCheckoutCallback)48 g_unavailableCheckoutCallback();46 if (checkoutUnavailable) 47 checkoutUnavailable(); 49 48 }); 50 49 } 51 52 checkout.registerUnavailableCheckoutCallback = function(unavailableCheckoutCallback)53 {54 g_unavailableCheckoutCallback = unavailableCheckoutCallback;55 };56 50 57 51 checkout.subversionURLForTest = function(testName) … … 73 67 }; 74 68 75 checkout.updateExpectations = function(failureInfoList, callback )69 checkout.updateExpectations = function(failureInfoList, callback, checkoutUnavailable) 76 70 { 77 71 callIfCheckoutAvailable(function() { … … 79 73 callback(); 80 74 }); 81 } );75 }, checkoutUnavailable); 82 76 }; 83 77 84 checkout.optimizeBaselines = function(testName, callback )78 checkout.optimizeBaselines = function(testName, callback, checkoutUnavailable) 85 79 { 86 80 callIfCheckoutAvailable(function() { … … 90 84 callback(); 91 85 }); 92 } );86 }, checkoutUnavailable); 93 87 }; 94 88 95 checkout.rollout = function(revision, reason, callback )89 checkout.rollout = function(revision, reason, callback, checkoutUnavailable) 96 90 { 97 91 callIfCheckoutAvailable(function() { … … 102 96 callback(); 103 97 }); 104 } );98 }, checkoutUnavailable); 105 99 }; 106 100 107 checkout.rebaseline = function(failureInfoList, callback, progressCallback )101 checkout.rebaseline = function(failureInfoList, callback, progressCallback, checkoutUnavailable) 108 102 { 109 103 callIfCheckoutAvailable(function() { … … 121 115 base.callInSequence(checkout.optimizeBaselines, testNameList, callback); 122 116 }); 123 } );117 }, checkoutUnavailable); 124 118 }; 125 119 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js
r94314 r95069 51 51 }], function() { 52 52 ok(true); 53 }, function() { 54 ok(false); 53 55 }); 54 56 }); … … 70 72 }); 71 73 72 test("rebaseline", 3, function() {74 test("rebaseline", 7, function() { 73 75 var simulator = new NetworkSimulator(); 74 76 … … 79 81 simulator.scheduleCallback(callback); 80 82 }; 83 simulator.ajax = function(options) 84 { 85 ok(options.url.indexOf('/ping') != -1); 86 simulator.scheduleCallback(options.success); 87 }; 88 89 var kExpectedTestNameProgressStack = [ 90 'fast/test.html', 91 'another/test.svg', 92 'another/test.svg', // This is the first one. 93 ]; 81 94 82 95 simulator.runTest(function() { … … 92 105 }], function() { 93 106 ok(true); 107 }, function(failureInfo) { 108 equals(failureInfo.testName, kExpectedTestNameProgressStack.pop()); 109 }, function() { 110 ok(false, 'Checkout should be available.'); 94 111 }); 95 112 }); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js
r95067 r95069 28 28 (function(){ 29 29 30 var kCheckoutUnavailableMessage = 'Failed! Garden-o-matic needs a local server to modify your working copy. Please run "webkit-patch garden-o-matic" start the local server.'; 31 30 32 // FIXME: Where should this function go? 31 33 function rebaselineWithStatusUpdates(failureInfoList) 32 34 { 33 var statusView = new ui.MessageBox( 34 'Rebaseline', 35 'Performing rebaseline...'); 35 var statusView = new ui.MessageBox('Rebaseline', 'Performing rebaseline...'); 36 36 37 37 checkout.rebaseline(failureInfoList, function() { 38 statusView.addMessage('Rebaseline done! Please land with "webkit-patch land-cowboy".'); 39 40 statusView.addActionList(new ui.actions.List([new ui.actions.Close()])); 41 $(statusView).bind('close', statusView.close.bind(statusView)); 38 statusView.addFinalMessage('Rebaseline done! Please land with "webkit-patch land-cowboy".'); 42 39 }, function(failureInfo) { 43 40 statusView.addMessage(failureInfo.testName + ' on ' + ui.displayNameForBuilder(failureInfo.builderName)); 41 }, function() { 42 statusView.addFinalMessage(kCheckoutUnavailableMessage); 44 43 }); 45 44 } 46 45 47 46 // FIXME: Where should this function go? 48 // FIXME: This should share more code with rebaselineWithStatusUpdates.49 47 function updateExpectationsWithStatusUpdates(failureInfoList) 50 48 { 51 var statusView = new ui.MessageBox( 52 'Expectations Update', 53 'Updating expectations...'); 49 var statusView = new ui.MessageBox('Expectations Update', 'Updating expectations...'); 54 50 55 51 checkout.updateExpectations(failureInfoList, function() { 56 statusView.add Message('Expectations update done! Please land with "webkit-patch land-cowboy".');57 statusView.addActionList(new ui.actions.List([new ui.actions.Close()]));58 $(statusView).bind('close', statusView.close.bind(statusView));52 statusView.addFinalMessage('Expectations update done! Please land with "webkit-patch land-cowboy".'); 53 }, function() { 54 statusView.addFinalMessage(kCheckoutUnavailableMessage); 59 55 }); 60 56 } … … 213 209 onRollout: function(revision, testNameList) 214 210 { 215 checkout.rollout(revision, ui.rolloutReasonForTestNameList(testNameList), $.noop); 211 checkout.rollout(revision, ui.rolloutReasonForTestNameList(testNameList), $.noop, function() { 212 // FIXME: We should have a better error UI. 213 alert(kCheckoutUnavailableMessage); 214 }); 216 215 } 217 216 }); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/garden-o-matic.js
r94540 r95069 58 58 g_updateTimerId = window.setInterval(update, config.kUpdateFrequency); 59 59 60 checkout.registerUnavailableCheckoutCallback(function() {61 alert('Please run "webkit-patch garden-o-matic" to enable this feature.');62 });63 64 60 onebar = new ui.onebar(); 65 61 onebar.attach(); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js
r95066 r95069 159 159 this._content.appendChild(element); 160 160 }, 161 addActionList: function(actionList) 161 // FIXME: It's unclear whether this code could live here or in a controller. 162 addFinalMessage: function(message) 162 163 { 163 this.appendChild(actionList); 164 this.addMessage(message); 165 this.appendChild(new ui.actions.List([new ui.actions.Close()])); 166 $(statusView).bind('close', statusView.close.bind(statusView)); 164 167 } 165 168 }); -
trunk/Tools/ChangeLog
r95068 r95069 1 2011-09-13 Adam Barth <abarth@webkit.org> 2 3 garden-o-matic has unfriendly error messages when the local server is not available 4 https://bugs.webkit.org/show_bug.cgi?id=68042 5 6 Reviewed by Dimitri Glazkov. 7 8 This patch moves us from using alert to showing the error inline in the 9 progress dialog. 10 11 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js: 12 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js: 13 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js: 14 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/garden-o-matic.js: 15 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js: 16 1 17 2011-09-13 Adam Barth <abarth@webkit.org> 2 18
Note: See TracChangeset
for help on using the changeset viewer.