Changeset 201475 in webkit
- Timestamp:
- May 27, 2016 5:06:01 PM (8 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 added
- 10 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js
r192630 r201475 1 1 /* 2 * Copyright (C) 2013-201 5Apple Inc. All rights reserved.2 * Copyright (C) 2013-2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 152 152 }, 153 153 154 javaScriptCoreTestFailuresURLForIteration: function(iteration, name) 155 { 156 return this.baseURL + "builders/" + encodeURIComponent(iteration.queue.id) + "/builds/" + iteration.id + "/steps/" + name + "/logs/json/text"; 157 }, 158 159 javaScriptCoreTestStdioUrlForIteration: function(iteration, name) 160 { 161 return this.baseURL + "builders/" + encodeURIComponent(iteration.queue.id) + "/builds/" + iteration.id + "/steps/" + name + "/logs/stdio"; 162 }, 163 154 164 layoutTestResultsDirectoryURLForIteration: function(iteration) 155 165 { -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js
r200880 r201475 1 1 /* 2 * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2015-2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 89 89 var message = this.revisionContentForIteration(slowestQueue.mostRecentSuccessfulIteration); 90 90 var statusMessagePassed = "all " + (queue.builder ? "builds succeeded" : "tests passed"); 91 var status = new StatusLineView(message, StatusLineView.Status.Good, statusMessagePassed, null, null);92 new PopoverTracker(status .statusBubbleElement, this._presentPopoverForCombinedGreenBubble.bind(this));93 this.element.appendChild(status .element);91 var statusView = new StatusLineView(message, StatusLineView.Status.Good, statusMessagePassed, null, null); 92 new PopoverTracker(statusView.statusBubbleElement, this._presentPopoverForCombinedGreenBubble.bind(this)); 93 this.element.appendChild(statusView.element); 94 94 } else { 95 95 this.appendBuildStyle.call(this, this.queues, null, function(queue) { … … 108 108 console.assert(!mostRecentFinishedIteration.successful); 109 109 var message = this.revisionContentForIteration(mostRecentFinishedIteration, mostRecentFinishedIteration.productive ? mostRecentSuccessfulIteration : null); 110 if (!mostRecentFinishedIteration.productive) 110 if (!mostRecentFinishedIteration.productive) { 111 111 var status = StatusLineView.Status.Danger; 112 else { 112 } else if (mostRecentFinishedIteration.failedTestSteps.length === 1 && mostRecentFinishedIteration.failedTestSteps[0].name in ["jscore-test", "webkit-32bit-jsc-test", "webkit-jsc-cloop-test"]) { 113 var failedStep = mostRecentFinishedIteration.failedTestSteps[0]; 114 var URL = mostRecentFinishedIteration.queue.buildbot.javaScriptCoreTestStdioUrlForIteration(mostRecentFinishedIteration, failedStep.name); 115 var statusView = new StatusLineView(message, StatusLineView.Status.Bad, this._testStepFailureDescription(failedStep), failedStep.failureCount, URL); 116 this.element.appendChild(statusView.element); 117 new PopoverTracker(statusView.statusBubbleElement, this._presentPopoverForJavaScriptCoreTestRegressions.bind(this, failedStep.name), mostRecentFinishedIteration); 118 return; 119 } else { 113 120 // Direct links to some common logs. 114 121 var url = mostRecentFinishedIteration.failureLogURL("build log"); … … 124 131 if (!url) 125 132 url = queue.buildbot.buildPageURLForIteration(mostRecentFinishedIteration); 126 var status = new StatusLineView(message, status, mostRecentFinishedIteration.text, null, url);127 this.element.appendChild(status .element);133 var statusView = new StatusLineView(message, status, mostRecentFinishedIteration.text, null, url); 134 this.element.appendChild(statusView.element); 128 135 129 136 if (needsPopover) 130 new PopoverTracker(status .statusBubbleElement, this._presentIndividualQueuePopover.bind(this), mostRecentFinishedIteration);137 new PopoverTracker(statusView.statusBubbleElement, this._presentIndividualQueuePopover.bind(this), mostRecentFinishedIteration); 131 138 } 132 139 … … 135 142 var message = this.revisionContentForIteration(mostRecentSuccessfulIteration); 136 143 var url = queue.buildbot.buildPageURLForIteration(mostRecentSuccessfulIteration); 137 var status = new StatusLineView(message, StatusLineView.Status.Good, firstRecentUnsuccessfulIteration ? "last succeeded" : statusMessagePassed, null, url); 138 this.element.appendChild(status.element); 144 var label = firstRecentUnsuccessfulIteration ? "last succeeded" : statusMessagePassed; 145 var statusView = new StatusLineView(message, StatusLineView.Status.Good, label, null, url); 146 this.element.appendChild(statusView.element); 139 147 } else { 140 var status = new StatusLineView("unknown", StatusLineView.Status.Neutral, firstRecentUnsuccessfulIteration ? "last succeeded" : statusMessagePassed); 141 this.element.appendChild(status.element); 148 var label = firstRecentUnsuccessfulIteration ? "last succeeded" : statusMessagePassed; 149 var statusView = new StatusLineView("unknown", StatusLineView.Status.Neutral, label); 150 this.element.appendChild(statusView.element); 142 151 143 152 if (firstRecentUnsuccessfulIteration) { -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js
r196403 r201475 1 1 /* 2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2014, 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 47 47 48 48 this.layoutTestResults = null; // Layout test results can be needed even if all tests passed, e.g. for the leaks bot. 49 this.javaScriptCoreTestResults = null; 49 50 50 51 this.failedTestSteps = []; … … 251 252 if (step.name === "layout-test") 252 253 this.layoutTestResults = results; 254 else if (step.name in ["jscore-test", "webkit-32bit-jsc-test", "webkit-jsc-cloop-test"]) 255 this.javaScriptCoreTestResults = results; 253 256 if (results.allPassed) 254 257 return; … … 354 357 callback(); 355 358 }.bind(this), {jsonpCallbackName: "ADD_RESULTS", withCredentials: this.queue.buildbot.needsAuthentication}); 356 } 357 }; 359 }, 360 361 loadJavaScriptCoreTestResults: function(testName, callback) 362 { 363 if (this.queue.buildbot.needsAuthentication && this.queue.buildbot.authenticationStatus === Buildbot.AuthenticationStatus.InvalidCredentials) 364 return; 365 366 JSON.load(this.queue.buildbot.javaScriptCoreTestFailuresURLForIteration(this, testName), function(data) { 367 this.queue.buildbot.isAuthenticated = true; 368 this.javaScriptCoreTestResults.addJavaScriptCoreTestFailures(data); 369 callback(); 370 }.bind(this), 371 function(data) { 372 if (data.errorType === JSON.LoadError && data.errorHTTPCode === 401) { 373 this.queue.buildbot.isAuthenticated = false; 374 this.dispatchEventToListeners(BuildbotIteration.Event.UnauthorizedAccess); 375 } 376 console.log(data.error); 377 callback(); 378 }.bind(this), {withCredentials: this.queue.buildbot.needsAuthentication}); 379 }, 380 }; -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js
r200880 r201475 1 1 /* 2 * Copyright (C) 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 74 74 }, 75 75 76 _createLoadingIndicator: function(iteration, heading) { 77 var content = document.createElement("div"); 78 content.className = "test-results-popover"; 79 80 this._addIterationHeadingToPopover(iteration, content, heading); 81 this._addDividerToPopover(content); 82 83 var loadingIndicator = document.createElement("div"); 84 loadingIndicator.className = "loading-indicator"; 85 loadingIndicator.textContent = "Loading\u2026"; 86 content.appendChild(loadingIndicator); 87 88 return content; 89 }, 90 91 // Work around bug 80159: -webkit-user-select:none not respected when copying content. 92 // We set clipboard data manually, temporarily making non-selectable content hidden 93 // to easily get accurate selection text. 94 _onPopoverCopy: function(event) { 95 var iterator = document.createNodeIterator( 96 event.currentTarget, 97 NodeFilter.SHOW_ELEMENT, 98 { 99 acceptNode: function(element) { 100 if (window.getComputedStyle(element).webkitUserSelect !== "none") 101 return NodeFilter.FILTER_ACCEPT; 102 return NodeFilter.FILTER_SKIP; 103 } 104 } 105 ); 106 107 while ((node = iterator.nextNode())) 108 node.style.visibility = "visible"; 109 110 event.currentTarget.style.visibility = "hidden"; 111 event.clipboardData.setData('text', window.getSelection()); 112 event.currentTarget.style.visibility = ""; 113 return false; 114 }, 115 116 _popoverContentForJavaScriptCoreTestRegressions: function(iteration, testName) 117 { 118 var content = document.createElement("div"); 119 content.className = "test-results-popover"; 120 121 this._addIterationHeadingToPopover(iteration, content, "javascriptcore test failures", iteration.javaScriptCoreTestStdioUrlForIteration(iteration, testName)); 122 this._addDividerToPopover(content); 123 124 if (!iteration.javaScriptCoreTestResults.regressions) { 125 var message = document.createElement("div"); 126 message.className = "loading-failure"; 127 message.textContent = "Test results couldn\u2019t be loaded"; 128 content.appendChild(message); 129 return content; 130 } 131 132 var regressions = iteration.javaScriptCoreTestResults.regressions; 133 134 for (var i = 0, end = regressions.length; i != end; ++i) { 135 var test = regressions[i]; 136 var rowElement = document.createElement("div"); 137 var testPathElement = document.createElement("span"); 138 testPathElement.className = "test-path"; 139 testPathElement.textContent = test; 140 rowElement.appendChild(testPathElement); 141 content.appendChild(rowElement); 142 } 143 144 content.oncopy = this._onPopoverCopy; 145 return content; 146 }, 147 148 _presentPopoverForJavaScriptCoreTestRegressions: function(testName, element, popover, iteration) 149 { 150 if (iteration.javaScriptCoreTestResults.regressions) 151 var content = this._popoverContentForJavaScriptCoreTestRegressions(iteration); 152 else { 153 var content = this._createLoadingIndicator(iteration, "javascriptcore test failures"); 154 iteration.loadJavaScriptCoreTestResults(testName, function() { 155 popover.content = this._popoverContentForJavaScriptCoreTestRegressions(iteration, testName); 156 }.bind(this)); 157 } 158 159 var rect = Dashboard.Rect.rectFromClientRect(element.getBoundingClientRect()); 160 popover.content = content; 161 popover.present(rect, [Dashboard.RectEdge.MIN_Y, Dashboard.RectEdge.MAX_Y, Dashboard.RectEdge.MAX_X, Dashboard.RectEdge.MIN_X]); 162 return true; 163 }, 164 76 165 _presentPopoverForRevisionRange: function(element, popover, context) 77 166 { … … 148 237 }, 149 238 150 _addIterationHeadingToPopover: function(iteration, content, additionalText )239 _addIterationHeadingToPopover: function(iteration, content, additionalText, additionalTextTarget) 151 240 { 152 241 var title = document.createElement("div"); … … 166 255 167 256 if (additionalText) { 168 var additionalTextElement = document.createElement("span"); 257 var elementType = additionalTextTarget ? "a" : "span"; 258 var additionalTextElement = document.createElement(elementType); 169 259 additionalTextElement.className = "additional-text"; 170 260 additionalTextElement.textContent = additionalText; 261 if (additionalTextTarget) { 262 additionalTextElement.href = additionalTextTarget; 263 additionalTextElement.target = "_blank"; 264 } 171 265 title.appendChild(additionalTextElement); 172 266 } … … 193 287 }, 194 288 289 _testStepFailureDescription: function(failedStep) 290 { 291 if (!failedStep.failureCount) 292 return BuildbotIteration.TestSteps[failedStep.name] + " failed"; 293 if (failedStep.failureCount === 1) 294 return BuildbotIteration.TestSteps[failedStep.name] + " failure"; 295 return BuildbotIteration.TestSteps[failedStep.name] + " failures"; 296 }, 297 298 _testStepFailureDescriptionWithCount: function(failedStep) 299 { 300 if (!failedStep.failureCount) 301 return this._testStepFailureDescription(failedStep); 302 if (failedStep.tooManyFailures) { 303 // E.g. "50+ layout test failures", preventing line breaks around the "+". 304 return failedStep.failureCount + "\ufeff\uff0b\u00a0" + this._testStepFailureDescription(failedStep); 305 } 306 // E.g. "1 layout test failure", preventing line break after the number. 307 return failedStep.failureCount + "\u00a0" + this._testStepFailureDescription(failedStep); 308 }, 309 195 310 appendBuildStyle: function(queues, defaultLabel, appendFunction) 196 311 { -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTestResults.js
r189559 r201475 1 1 /* 2 * Copyright (C) 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 185 185 console.assert(data.num_missing >= this.testsWithMissingResults.length); 186 186 }, 187 188 addJavaScriptCoreTestFailures: function(data) 189 { 190 this.regressions = data.stressTestFailures; 191 }, 187 192 }; -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js
r200880 r201475 1 1 /* 2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2014, 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 106 106 var status = new StatusLineView(messageElement, StatusLineView.Status.Bad, this._testStepFailureDescription(failedStep), failedStep.tooManyFailures ? failedStep.failureCount + "\uff0b" : failedStep.failureCount, iteration.queue.buildbot.layoutTestResultsURLForIteration(iteration)); 107 107 new PopoverTracker(status.statusBubbleElement, this._presentPopoverForLayoutTestRegressions.bind(this), iteration); 108 } else if (failedStep.name in ["jscore-test", "webkit-32bit-jsc-test", "webkit-jsc-cloop-test"]) { 109 var status = new StatusLineView(messageElement, StatusLineView.Status.Bad, this._testStepFailureDescription(failedStep), failedStep.failureCount, iteration.queue.buildbot.javaScriptCoreTestStdioUrlForIteration(iteration, failedStep.name)); 110 new PopoverTracker(status.statusBubbleElement, this._presentPopoverForJavaScriptCoreTestRegressions.bind(this, failedStep.name), iteration); 108 111 } else { 109 112 var status = new StatusLineView(messageElement, StatusLineView.Status.Bad, this._testStepFailureDescription(failedStep), failedStep.failureCount ? failedStep.failureCount : undefined, failedStep.URL); … … 129 132 this.appendBuildStyle.call(this, this.releaseQueues, "Release", appendBuilderQueueStatus); 130 133 this.appendBuildStyle.call(this, this.debugQueues, "Debug", appendBuilderQueueStatus); 131 },132 133 _testStepFailureDescription: function(failedStep)134 {135 if (!failedStep.failureCount)136 return BuildbotIteration.TestSteps[failedStep.name] + " failed";137 if (failedStep.failureCount === 1)138 return BuildbotIteration.TestSteps[failedStep.name] + " failure";139 return BuildbotIteration.TestSteps[failedStep.name] + " failures";140 },141 142 _testStepFailureDescriptionWithCount: function(failedStep)143 {144 if (!failedStep.failureCount)145 return this._testStepFailureDescription(failedStep);146 if (failedStep.tooManyFailures) {147 // E.g. "50+ layout test failures", preventing line breaks around the "+".148 return failedStep.failureCount + "\ufeff\uff0b\u00a0" + this._testStepFailureDescription(failedStep);149 }150 // E.g. "1 layout test failure", preventing line break after the number.151 return failedStep.failureCount + "\u00a0" + this._testStepFailureDescription(failedStep);152 134 }, 153 135 … … 230 212 } 231 213 232 // Work around bug 80159: -webkit-user-select:none not respected when copying content. 233 // We set clipboard data manually, temporarily making non-selectable content hidden 234 // to easily get accurate selection text. 235 content.oncopy = function(event) { 236 var iterator = document.createNodeIterator( 237 event.currentTarget, 238 NodeFilter.SHOW_ELEMENT, 239 { 240 acceptNode: function(element) { 241 if (window.getComputedStyle(element).webkitUserSelect !== "none") 242 return NodeFilter.FILTER_ACCEPT; 243 return NodeFilter.FILTER_SKIP; 244 } 245 } 246 ); 247 248 while ((node = iterator.nextNode())) 249 node.style.visibility = "visible"; 250 251 event.currentTarget.style.visibility = "hidden"; 252 event.clipboardData.setData('text', window.getSelection()); 253 event.currentTarget.style.visibility = ""; 254 return false; 255 } 256 214 content.oncopy = this._onPopoverCopy; 257 215 return content; 258 216 }, … … 263 221 var content = this._popoverContentForLayoutTestRegressions(iteration); 264 222 else { 265 var content = document.createElement("div"); 266 content.className = "test-results-popover"; 267 268 this._addIterationHeadingToPopover(iteration, content, "layout test failures"); 269 this._addDividerToPopover(content); 270 271 var loadingIndicator = document.createElement("div"); 272 loadingIndicator.className = "loading-indicator"; 273 loadingIndicator.textContent = "Loading\u2026"; 274 content.appendChild(loadingIndicator); 223 var content = this._createLoadingIndicator(iteration, "layout test failures"); 275 224 276 225 iteration.loadLayoutTestResults(function() { -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index.html
r199180 r201475 64 64 <script src="../../../../../../../Source/ThirdParty/qunit/qunit/qunit.js"></script> 65 65 <script src="resources/MockTrac.js"></script> 66 <script src="resources/MockBuildbot.js"></script> 66 67 <script src="resources/MockBuildbotQueue.js"></script> 67 68 <script src="resources/MockBuildbotQueueView.js"></script> 69 <script src="resources/MockBuildbotTestResults.js"></script> 68 70 <script src="resources/tests.js"></script> 69 71 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbot.js
r201474 r201475 1 1 /* 2 * Copyright (C) 2016 Apple ,Inc. All rights reserved.2 * Copyright (C) 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 MockBuildbotQueue = function() 27 { 28 info = { 29 branches: "", 30 platform: "", 31 debug: "", 32 builder: "", 33 tester: "", 34 performance: "", 35 staticAnalyzer: "", 36 leaks: "", 37 architecture: "", 38 testCategory: "", 39 heading: "", 40 crashesOnly: "" 41 }; 42 BuildbotQueue.call(this, "Mock BuildBot", "id", info); 43 }; 26 MockBuildbot = function() {}; 44 27 45 BaseObject.addConstructorFunctions(MockBuildbotQueue); 28 MockBuildbot.prototype = { 29 constructor: MockBuildbot, 46 30 47 MockBuildbotQueue.prototype = { 48 constructor: MockBuildbotQueue, 49 __proto__: BuildbotQueue.prototype 31 buildPageURLForIteration: function(iteration) 32 { 33 return this.baseURL + "builders/" + encodeURIComponent(iteration.queue.id) + "/builds/" + iteration.id; 34 }, 35 36 javaScriptCoreTestFailuresURLForIteration: function(iteration, name) 37 { 38 return "resources/test-jsc-results.json"; 39 }, 40 41 javaScriptCoreTestStdioUrlForIteration: function(iteration, name) 42 { 43 return this.baseURL + "builders/" + encodeURIComponent(iteration.queue.id) + "/builds/" + iteration.id + "/steps/" + name + "/logs/stdio"; 44 45 }, 50 46 } -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js
r199180 r201475 40 40 crashesOnly: "" 41 41 }; 42 BuildbotQueue.call(this, "Mock BuildBot", "id", info);42 BuildbotQueue.call(this, new MockBuildbot(), "id", info); 43 43 }; 44 44 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotTestResults.js
r201474 r201475 1 1 /* 2 * Copyright (C) 2016 Apple ,Inc. All rights reserved.2 * Copyright (C) 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 MockBuildbotQueue = function() 27 { 28 info = { 29 branches: "", 30 platform: "", 31 debug: "", 32 builder: "", 33 tester: "", 34 performance: "", 35 staticAnalyzer: "", 36 leaks: "", 37 architecture: "", 38 testCategory: "", 39 heading: "", 40 crashesOnly: "" 41 }; 42 BuildbotQueue.call(this, "Mock BuildBot", "id", info); 26 MockBuildbotTestResults = function() {}; 27 28 MockBuildbotTestResults.prototype = { 29 constructor: MockBuildbotTestResults, 30 31 addJavaScriptCoreTestFailures: function(data) 32 { 33 this.regressions = data.stressTestFailures; 34 }, 43 35 }; 44 45 BaseObject.addConstructorFunctions(MockBuildbotQueue);46 47 MockBuildbotQueue.prototype = {48 constructor: MockBuildbotQueue,49 __proto__: BuildbotQueue.prototype50 } -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js
r199180 r201475 264 264 }); 265 265 266 test("_popoverContentForJavaScriptCoreTestRegressions load failure UI test", function() 267 { 268 var finished = false; 269 var iteration = new BuildbotIteration(this.queue, 1, finished); 270 iteration.javaScriptCoreTestResults = new MockBuildbotTestResults(); 271 272 var view = new BuildbotQueueView(); 273 var content = view._popoverContentForJavaScriptCoreTestRegressions(iteration); 274 275 var numChildrenInEmptyPopoverContent = 2; 276 strictEqual(content.childNodes.length, 1 + numChildrenInEmptyPopoverContent); 277 strictEqual(content.childNodes[numChildrenInEmptyPopoverContent].className, "loading-failure", "Popover for loading failure must have the appropriate class"); 278 strictEqual(content.childNodes[numChildrenInEmptyPopoverContent].textContent, "Test results couldn\u2019t be loaded", "Popover for loading failure must use the correct text"); 279 }); 280 281 test("_presentPopoverForJavaScriptCoreTestRegressions including loading", function() 282 { 283 var finished = false; 284 var element = document.createElement("div"); 285 var popover = new Dashboard.Popover(); 286 var iteration = new BuildbotIteration(this.queue, 1, finished); 287 iteration.javaScriptCoreTestResults = new MockBuildbotTestResults(); 288 289 var view = new BuildbotQueueView(); 290 view._presentPopoverForJavaScriptCoreTestRegressions(element, popover, iteration, "jscore-test"); 291 292 JSON.load("resources/test-jsc-results.json", function(data) 293 { 294 var testRegressions = data.stressTestFailures; 295 var numChildrenInEmptyPopoverContent = 2; 296 strictEqual(popover._content.childNodes.length - numChildrenInEmptyPopoverContent, 297 testRegressions.length, 298 "Number of failures in popover must be equal to number of failed tests"); 299 300 for (var i = 0; i < testRegressions.length; i++) 301 { 302 strictEqual(popover._content.childNodes[i+numChildrenInEmptyPopoverContent].childNodes[0].textContent, 303 testRegressions[i], 304 "Names of failures must match" 305 ); 306 } 307 }); 308 }); 309 310 test("_createLoadingIndicator", function() 311 { 312 var finished = false; 313 var iteration = new BuildbotIteration(this.queue, 1, finished); 314 315 var view = new BuildbotQueueView(); 316 var heading = "Fair is foul, and foul is fair"; 317 var content = view._createLoadingIndicator(iteration, heading); 318 319 var numChildrenInEmptyPopoverContent = 2; 320 strictEqual(content.childNodes.length, 1 + numChildrenInEmptyPopoverContent); 321 strictEqual(content.childNodes[numChildrenInEmptyPopoverContent].className, "loading-indicator", "Popover for loading indicator must have the appropriate class"); 322 strictEqual(content.childNodes[numChildrenInEmptyPopoverContent].textContent, "Loading\u2026", "Popover for loading failure must use the correct text"); 323 }); 324 325 test("_presentPopoverForJavaScriptCoreTestRegressions already loaded", function() 326 { 327 var finished = false; 328 var element = document.createElement("div"); 329 var popover = new Dashboard.Popover(); 330 var iteration = new BuildbotIteration(this.queue, 1, finished); 331 iteration.javaScriptCoreTestResults = {"regressions": ["uno", "dos", "tres"]}; 332 333 var view = new BuildbotQueueView(); 334 view._presentPopoverForJavaScriptCoreTestRegressions(element, popover, iteration, "jscore-test"); 335 336 var numChildrenInEmptyPopoverContent = 2; 337 strictEqual(popover._content.childNodes.length - numChildrenInEmptyPopoverContent, 338 iteration.javaScriptCoreTestResults.regressions.length, 339 "Number of failures in popover must be equal to number of failed tests"); 340 341 for (var i = 0; i < iteration.javaScriptCoreTestResults.regressions.length; i++) 342 { 343 strictEqual(popover._content.childNodes[i+numChildrenInEmptyPopoverContent].childNodes[0].textContent, 344 iteration.javaScriptCoreTestResults.regressions[i], 345 "Names of failures must match" 346 ); 347 } 348 }); 349 266 350 module("BuildBotQueue", { 267 351 setup: function() { -
trunk/Tools/ChangeLog
r201464 r201475 1 2016-05-27 Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> 2 3 Display failing JSC stress tests in buildbot dashboard 4 https://bugs.webkit.org/show_bug.cgi?id=156595 5 6 Reviewed by Alexey Proskuryakov. 7 8 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js: 9 (Buildbot.prototype.javaScriptCoreTestFailuresURLForIteration): 10 (Buildbot.prototype.javaScriptCoreTestStdioUrlForIteration): 11 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js: 12 (BuildbotCombinedQueueView.prototype.update): 13 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js: 14 (BuildbotIteration): 15 (BuildbotIteration.prototype._parseData): 16 (BuildbotIteration.prototype.loadLayoutTestResults): 17 (BuildbotIteration.prototype.): 18 (BuildbotIteration.prototype.loadJavaScriptCoreTestResults): 19 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js: 20 (BuildbotQueueView.prototype._createLoadingIndicator): 21 (BuildbotQueueView.prototype.): 22 (BuildbotQueueView.prototype._onPopoverCopy): 23 (BuildbotQueueView.prototype._popoverContentForJavaScriptCoreTestRegressions): 24 (BuildbotQueueView.prototype._presentPopoverForJavaScriptCoreTestRegressions): 25 (BuildbotQueueView.prototype._addIterationHeadingToPopover): 26 (BuildbotQueueView.prototype._testStepFailureDescription): 27 (BuildbotQueueView.prototype._testStepFailureDescriptionWithCount): 28 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTestResults.js: 29 (BuildbotTestResults.prototype.addJavaScriptCoreTestFailures): 30 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js: 31 (BuildbotTesterQueueView.prototype.appendBuilderQueueStatus): 32 (BuildbotTesterQueueView.prototype.update): 33 (BuildbotTesterQueueView.prototype._popoverContentForLayoutTestRegressions): 34 (BuildbotTesterQueueView.prototype._presentPopoverForLayoutTestRegressions): 35 (BuildbotTesterQueueView.prototype._testStepFailureDescription): Deleted. 36 (BuildbotTesterQueueView.prototype._testStepFailureDescriptionWithCount): Deleted. 37 (BuildbotTesterQueueView.prototype.): Deleted. 38 (BuildbotTesterQueueView.prototype.content.oncopy): Deleted. 39 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index.html: 40 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbot.js: Copied from Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js. 41 (MockBuildbot): 42 (MockBuildbot.prototype.buildPageURLForIteration): 43 (MockBuildbot.prototype.javaScriptCoreTestFailuresURLForIteration): 44 (MockBuildbot.prototype.javaScriptCoreTestStdioUrlForIteration): 45 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js: 46 (MockBuildbotQueue): 47 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotTestResults.js: Copied from Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js. 48 (MockBuildbotTestResults): 49 (MockBuildbotTestResults.prototype.addJavaScriptCoreTestFailures): 50 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-jsc-results.json: Added. 51 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js: 52 53 2016-05-27 Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> 54 55 Display failing JSC stress tests in buildbot dashboard 56 https://bugs.webkit.org/show_bug.cgi?id=156595 57 58 Reviewed by Alexey Proskuryakov. 59 60 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js: 61 (Buildbot.prototype.javaScriptCoreTestFailuresURLForIteration): Generate the URL for raw JSON output of 62 JSC tests. 63 (Buildbot.prototype.javaScriptCoreTestStdioURLForIteration): Generate the URL for human-readable stdio output 64 of JSC tests. 65 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js: 66 (BuildbotCombinedQueueView.prototype.update): Display JSC test results in popover. 67 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js: 68 (BuildbotIteration): Add javaScriptCoreTestResults variable. 69 (BuildbotIteration.prototype.): Check for javascriptcore tests step. 70 (BuildbotIteration.prototype.loadLayoutTestResults): Add comma at closing brace. 71 (BuildbotIteration.prototype.loadJavaScriptCoreTestResults): Fetch JSON from Buildbot server. 72 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js: 73 (BuildbotQueueView.prototype._createLoadingIndicator): Reusable function. 74 (BuildbotQueueView.prototype._onPopoverCopy): Reusable copy event handler to allow accurate copying of text 75 from popovers. 76 (BuildbotQueueView.prototype._popoverContentForJavaScriptCoreTestRegressions): Generates the popover bubble's 77 inner HTML from the JSC failure data. 78 (BuildbotQueueView.prototype._presentPopoverForJavaScriptCoreTestRegressions): Generate the popover bubble 79 for JSC results and handle request failures. 80 (BuildbotQueueView.prototype._testStepFailureDescription): Moved from subclass. 81 (BuildbotQueueView.prototype._testStepFailureDescriptionWithCount): Moved from subclass. 82 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTestResults.js: 83 (BuildbotTestResults.prototype.addJavaScriptCoreTestFailures): Parse JSON into a list of failing tests. 84 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js: 85 (BuildbotTesterQueueView.prototype.appendBuilderQueueStatus): Instantiate PopoverTrackers for builds whose 86 only failures are JSC tests. 87 (BuildbotTesterQueueView.prototype._popoverContentForLayoutTestRegressions): Use _onPopoverCopy. 88 (BuildbotTesterQueueView.prototype._presentPopoverForLayoutTestRegressions): Use _createLoadingIndicator. 89 (BuildbotTesterQueueView.prototype._testStepFailureDescription): Deleted. Moved to superclass. 90 (BuildbotTesterQueueView.prototype._testStepFailureDescriptionWithCount): Deleted. Moved to superclass. 91 (BuildbotTesterQueueView.prototype.content.oncopy): Deleted. Using superclass's reusable function as copy handler instead. 92 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index.html: Add new script files. 93 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbot.js: Added. 94 (MockBuildbot): Mocked version of Buildbot, only containing URL methods. 95 (MockBuildbot.prototype.buildPageURLForIteration): Same as real Buildbot.js 96 (MockBuildbot.prototype.javaScriptCoreTestFailuresURLForIteration): Points to local file containing JSON for test. 97 (MockBuildbot.prototype.javaScriptCoreTestStdioURLForIteration): Same as real Buildbot.js 98 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js: 99 (MockBuildbotQueue): Use a MockBuildbot() instead of a string. 100 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotTestResults.js: Added. 101 (MockBuildbotTestResults): Mocked version of BuildbotTestResults. 102 (MockBuildbotTestResults.prototype.addJavaScriptCoreTestFailures): Sets the 'regressions' variable. 103 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-jsc-results.json: Added. 104 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js: Add four groups of tests. 105 1 106 2016-05-27 Chris Dumez <cdumez@apple.com> 2 107
Note: See TracChangeset
for help on using the changeset viewer.