Changeset 93016 in webkit
- Timestamp:
- Aug 13, 2011 8:39:03 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/base.js
r92972 r93016 112 112 this._callback = callback; 113 113 this._args = args || []; 114 }; 115 116 base.RequestTracker.prototype.requestComplete = function() 117 { 118 --this._requestsInFlight; 119 if (!this._requestsInFlight) 120 this._callback.apply(null, this._args); 121 }; 114 this._tryCallback(); 115 }; 116 117 base.RequestTracker.prototype = { 118 _tryCallback: function() 119 { 120 if (!this._requestsInFlight && this._callback) 121 this._callback.apply(null, this._args); 122 }, 123 requestComplete: function() 124 { 125 --this._requestsInFlight; 126 this._tryCallback(); 127 } 128 } 122 129 123 130 base.callInParallel = function(functionList, callback) -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/base_unittests.js
r92972 r93016 114 114 }); 115 115 116 test("RequestTracker", 3, function() {116 test("RequestTracker", 5, function() { 117 117 var ready = false; 118 118 var tracker = new base.RequestTracker(1, function() { … … 133 133 134 134 tracker = new base.RequestTracker(0, function() { 135 ok(false); 136 }); 137 tracker.requestComplete(); 135 ok(true); 136 }); 137 tracker.requestComplete(); 138 139 tracker = new base.RequestTracker(0); 140 tracker.requestComplete(); 141 // Should not barf. 142 ok(true); 138 143 }); 139 144 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js
r92886 r93016 288 288 showRecentCommits(); 289 289 showBuilderProgress(); 290 model.analyzeUnexpectedFailures(showUnexpectedFailure); 291 dismissButterbar(); 290 model.analyzeUnexpectedFailures(showUnexpectedFailure, dismissButterbar); 292 291 checkForLocalServer(); 293 292 }); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/model.js
r92886 r93016 115 115 }; 116 116 117 model.analyzeUnexpectedFailures = function(callback )117 model.analyzeUnexpectedFailures = function(callback, completionCallback) 118 118 { 119 119 var unexpectedFailures = results.unexpectedFailuresByTest(model.state.resultsByBuilder); … … 124 124 }); 125 125 126 var tracker = new base.RequestTracker(Object.keys(unexpectedFailures).length, completionCallback); 126 127 $.each(unexpectedFailures, function(testName, resultNodesByBuilder) { 127 128 var builderNameList = base.keys(resultNodesByBuilder); … … 146 147 model.state.failureAnalysisByTest[testName] = failureAnalysis; 147 148 callback(failureAnalysis); 149 tracker.requestComplete(); 148 150 }); 149 151 }); -
trunk/Tools/ChangeLog
r93005 r93016 1 2011-08-13 Dimitri Glazkov <dglazkov@chromium.org> 2 3 garden-o-matic's analyzeUnexpectedFailures needs a completion callback. 4 https://bugs.webkit.org/show_bug.cgi?id=66166 5 6 Also changed base.RequestTracker to: 7 a) fire callback immediately if requestsInFlight is 0; 8 b) not barf if callback is not supplied. 9 10 Reviewed by Adam Barth. 11 12 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js: Started using completion callback. 13 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/model.js: Added completion callback. 14 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/base.js: Changed RequestTracker. 15 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/base_unittest.js: Added unit tests. 16 1 17 2011-08-12 Mark Rowe <mrowe@apple.com> 2 18
Note: See TracChangeset
for help on using the changeset viewer.