Changeset 94309 in webkit
- Timestamp:
- Sep 1, 2011 10:48:59 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js
r93641 r94309 55 55 }; 56 56 57 base.dirName = function(path) 58 { 59 var directoryIndex = path.lastIndexOf('/'); 60 if (directoryIndex == -1) 61 return path; 62 return path.substr(0, directoryIndex); 63 }; 64 57 65 base.trimExtension = function(url) 58 66 { -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js
r93641 r94309 57 57 var value = base.joinPath("", "test.html"); 58 58 equals(value, "test.html"); 59 }); 60 61 test("dirName", 3, function() { 62 equals(base.dirName("foo.html"), "foo.html"); 63 equals(base.dirName("foo/bar.html"), "foo"); 64 equals(base.dirName("foo/bar/baz.html"), "foo/bar"); 59 65 }); 60 66 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js
r93906 r94309 52 52 equal(grid.outerHTML, '<table class="failures">' + 53 53 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 54 '<tbody>< /tbody>' +54 '<tbody><tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr></tbody>' + 55 55 '</table>'); 56 56 var row = grid._rowByResult('TEXT'); … … 58 58 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 59 59 '<tbody>' + 60 '<tr >' +60 '<tr class="TEXT">' + 61 61 '<td>TEXT</td><td></td><td></td>' + 62 62 '</tr>' + 63 '<tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr>' + 63 64 '</tbody>' + 64 65 '</table>'); 65 equal(row.outerHTML, '<tr ><td>TEXT</td><td></td><td></td></tr>');66 equal(row.outerHTML, '<tr class="TEXT"><td>TEXT</td><td></td><td></td></tr>'); 66 67 grid.add({}); 67 68 equal(grid.outerHTML, '<table class="failures">' + 68 69 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 69 70 '<tbody>' + 70 '<tr >' +71 '<tr class="TEXT">' + 71 72 '<td>TEXT</td><td></td><td></td>' + 72 73 '</tr>' + 74 '<tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr>' + 73 75 '</tbody>' + 74 76 '</table>'); … … 80 82 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 81 83 '<tbody>' + 82 '<tr >' +84 '<tr class="TEXT">' + 83 85 '<td>TEXT</td>' + 84 86 '<td></td>' + 85 87 '<td><div><span class="architecture">64-bit</span><span class="version">lucid</span></div></td>' + 86 88 '</tr>' + 89 '<tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr>' + 87 90 '</tbody>' + 88 91 '</table>'); … … 91 94 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 92 95 '<tbody>' + 93 '<tr>' + 96 '<tr class="IMAGE+TEXT">' + 97 '<td>IMAGE+TEXT</td>' + 98 '<td><div><span class="version">leopard</span></div></td>' + 99 '<td></td>' + 100 '</tr>' + 101 '<tr class="TEXT">' + 94 102 '<td>TEXT</td>' + 95 103 '<td></td>' + 96 104 '<td><div><span class="architecture">64-bit</span><span class="version">lucid</span></div></td>' + 97 105 '</tr>' + 98 '<tr>' + 99 '<td>IMAGE+TEXT</td>' + 100 '<td><div><span class="version">leopard</span></div></td>' + 101 '<td></td>' + 102 '</tr>' + 106 '<tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr>' + 103 107 '</tbody>' + 104 108 '</table>'); … … 107 111 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 108 112 '<tbody>' + 109 '<tr>' + 113 '<tr class="IMAGE+TEXT">' + 114 '<td>IMAGE+TEXT</td>' + 115 '<td><div><span class="version">leopard</span></div></td>' + 116 '<td></td>' + 117 '</tr>' + 118 '<tr class="TEXT">' + 110 119 '<td>TEXT</td>' + 111 120 '<td></td>' + 112 121 '<td><div><span class="architecture">64-bit</span><span class="version">lucid</span></div></td>' + 113 122 '</tr>' + 114 '<tr>' + 115 '<td>IMAGE+TEXT</td>' + 116 '<td><div><span class="version">leopard</span></div></td>' + 117 '<td></td>' + 118 '</tr>' + 123 '<tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr>' + 119 124 '</tbody>' + 120 125 '</table>'); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js
r93926 r94309 29 29 (function(){ 30 30 31 var kMaxTestsPerGroup = 3; 32 31 33 ui.notifications.Stream = base.extends('ol', { 32 34 init: function() … … 83 85 }); 84 86 85 ui.notifications.FailingTest = base.extends('li', { 86 init: function(failureAnalysis) 87 { 88 this._failureAnalysis = failureAnalysis; 89 this.textContent = failureAnalysis.testName; 90 }, 91 equals: function(failureAnalysis) 92 { 93 return this._failureAnalysis.testName == failureAnalysis.testName; 87 ui.notifications.FailingTestGroup = base.extends('li', { 88 init: function(testGroup) 89 { 90 this.textContent = testGroup; 94 91 } 95 92 }) … … 161 158 containsFailureAnalysis: function(failureAnalysis) 162 159 { 163 return Array.prototype.some.call(this._effects.children, function(child) { 164 return child.equals(failureAnalysis); 165 }); 160 return this._testNameList.indexOf(failureAnalysis.testName) != -1; 166 161 }, 167 162 updateBuilderResults: function(resultNodesByBuilder) … … 175 170 this._testNameList.push(failureAnalysis.testName); 176 171 this.updateBuilderResults(failureAnalysis.resultNodesByBuilder); 177 return this._effects.appendChild(new ui.notifications.FailingTest(failureAnalysis)); 172 $(this._effects).empty(); 173 this._forEachTestGroup(function (testGroup) { 174 this._effects.appendChild(new ui.notifications.FailingTestGroup(testGroup)) 175 }.bind(this)); 178 176 }, 179 177 addCommitData: function(commitData) … … 185 183 } 186 184 return this._causes.appendChild(new ui.notifications.SuspiciousCommit(commitData)); 185 }, 186 _forEachTestGroup: function(callback) 187 { 188 var testsByDirectory = {}; 189 this._testNameList.forEach(function(testName) { 190 var directory = base.dirName(testName); 191 testsByDirectory[directory] = testsByDirectory[directory] || []; 192 testsByDirectory[directory].push(testName); 193 }); 194 var individualTests = []; 195 Object.keys(testsByDirectory).forEach(function(directory) { 196 var testsInDirectory = testsByDirectory[directory]; 197 var count = testsInDirectory.length; 198 if (count <= kMaxTestsPerGroup) { 199 individualTests = individualTests.concat(testsInDirectory); 200 return; 201 } 202 callback(directory + ' (' + count + ' tests)'); 203 }); 204 individualTests.forEach(callback); 187 205 } 188 206 }); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js
r93926 r94309 77 77 }); 78 78 79 test('FailingTest ', 4, function() {80 var failingTest = new ui.notifications.FailingTest ({testName: 'test'});79 test('FailingTestGroup', 2, function() { 80 var failingTest = new ui.notifications.FailingTestGroup('test'); 81 81 equal(failingTest.tagName, 'LI'); 82 82 equal(failingTest.innerHTML, 'test'); 83 ok(failingTest.equals({testName: 'test'}));84 ok(!failingTest.equals({testName: 'foo'}));85 83 }); 86 84 … … 107 105 "updateBuilderResults", 108 106 "addFailureAnalysis", 107 "_forEachTestGroup", 109 108 "containsFailureAnalysis", 110 109 "addCommitData" … … 116 115 '<table class="failures">' + 117 116 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 118 '<tbody>< /tbody>' +117 '<tbody><tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr></tbody>' + 119 118 '</table>' + 120 119 '</div>' + … … 135 134 '<table class="failures">' + 136 135 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 137 '<tbody>< /tbody>' +136 '<tbody><tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr></tbody>' + 138 137 '</table>' + 139 138 '</div>' + … … 157 156 '<table class="failures">' + 158 157 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 159 '<tbody>< /tbody>' +158 '<tbody><tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr></tbody>' + 160 159 '</table>' + 161 160 '</div>' + … … 181 180 '<table class="failures">' + 182 181 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 183 '<tbody>< /tbody>' +182 '<tbody><tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr></tbody>' + 184 183 '</table>' + 185 184 '</div>' + … … 215 214 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 216 215 '<tbody>' + 217 '<tr >' +216 '<tr class="TEXT">' + 218 217 '<td>TEXT</td>' + 219 218 '<td></td>' + 220 219 '<td><div><span class="architecture">64-bit</span><span class="version">lucid</span></div></td>' + 221 220 '</tr>' + 221 '<tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr>' + 222 222 '</tbody>' + 223 223 '</table>' + … … 255 255 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 256 256 '<tbody>' + 257 '<tr >' +257 '<tr class="TEXT">' + 258 258 '<td>TEXT</td>' + 259 259 '<td></td>' + 260 260 '<td><div><span class="architecture">64-bit</span><span class="version">lucid</span></div></td>' + 261 261 '</tr>' + 262 '<tr >' +262 '<tr class="BUILDING" style="">' + 263 263 '<td>BUILDING</td>' + 264 264 '<td><div><span class="version">leopard</span></div></td>' + … … 294 294 }); 295 295 296 test('TestsFailing (grouping)', 1, function() { 297 var testFailures = new ui.notifications.TestsFailing(); 298 testFailures.addFailureAnalysis({testName: 'path/to/test1.html', resultNodesByBuilder: {}}); 299 testFailures.addFailureAnalysis({testName: 'path/to/test2.html', resultNodesByBuilder: {}}); 300 testFailures.addFailureAnalysis({testName: 'path/to/test3.html', resultNodesByBuilder: {}}); 301 testFailures.addFailureAnalysis({testName: 'path/to/test4.html', resultNodesByBuilder: {}}); 302 testFailures.addFailureAnalysis({testName: 'path/another/test.html', resultNodesByBuilder: {}}); 303 equal(testFailures.innerHTML, 304 '<div class="how">' + 305 '<time class="relative">Just now</time>' + 306 '<table class="failures">' + 307 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 308 '<tbody><tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr></tbody>' + 309 '</table>' + 310 '</div>' + 311 '<div class="what">' + 312 '<div class="problem">' + 313 '<ul class="effects">' + 314 '<li>path/to (4 tests)</li>' + 315 '<li>path/another/test.html</li>' + 316 '</ul>' + 317 '<ul class="actions">' + 318 '<li><button>Examine</button></li>' + 319 '</ul>' + 320 '</div>' + 321 '<ul class="causes"></ul>' + 322 '</div>'); 323 324 }); 325 296 326 test('BuildersFailing', 1, function() { 297 327 var builderFailing = new ui.notifications.BuildersFailing(); … … 302 332 '<table class="failures">' + 303 333 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + 304 '<tbody>< /tbody>' +334 '<tbody><tr class="BUILDING" style="display: none; "><td>BUILDING</td><td></td><td></td></tr></tbody>' + 305 335 '</table>' + 306 336 '</div>' + -
trunk/Tools/ChangeLog
r94308 r94309 1 2011-09-01 Adam Barth <abarth@webkit.org> 2 3 Group failing tests in garden-o-matic if there are more than three in a folder 4 https://bugs.webkit.org/show_bug.cgi?id=67373 5 6 Reviewed by Dimitri Glazkov. 7 8 Sometimes a failure will cause many tests in a given directory to fail. 9 When that happens, it's better to list the directory as a single item 10 (with a count) rather than spamming all the test names. 11 12 (This patch also updates a bunch of unit test expected results after my last commit.) 13 14 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js: 15 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js: 16 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js: 17 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js: 18 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js: 19 1 20 2011-09-01 Adam Barth <abarth@webkit.org> 2 21
Note: See TracChangeset
for help on using the changeset viewer.