Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm.js (91271 => 91272)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm.js 2011-07-19 17:40:17 UTC (rev 91271)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm.js 2011-07-19 18:11:39 UTC (rev 91272)
@@ -23,93 +23,23 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-// FIXME: These should probably move to some WebKitBugzilla class (or similar).
-const BugzillaConstants = {
- Component: {
- ToolsTests: 'Tools / Tests',
- },
-
- Keyword: {
- LayoutTestFailure: 'LayoutTestFailure',
- MakingBotsRed: 'MakingBotsRed',
- Regression: 'Regression',
- },
-
- OperatingSystem: {
- Leopard: 'Mac OS X 10.5',
- SnowLeopard: 'Mac OS X 10.6',
- Windows7: 'Windows 7',
- WindowsXP: 'Windows XP',
- },
-
- Platform: {
- Macintosh: 'Macintosh',
- PC: 'PC',
- },
-
- Product: {
- WebKit: 'WebKit',
- },
-
- Version: {
- Nightly: '528+ (Nightly Build)',
- },
-};
-
function FailingTestsBugForm(bugzilla, trac, tester, failingBuildName, passingBuildName, failingTests) {
- NewBugForm.call(this, bugzilla);
+ TestRelatedBugForm.call(this, bugzilla, tester);
this._trac = trac;
- this._tester = tester;
this._failingBuildName = failingBuildName;
this._passingBuildName = passingBuildName;
this._failingTests = failingTests;
- this.component = BugzillaConstants.Component.ToolsTests;
this.description = this._createBugDescription();
// FIXME: When a newly-added test has been failing since its introduction, it isn't really a
// "regression". We should use different keywords in that case. <http://webkit.org/b/61645>
- this.keywords = [
- BugzillaConstants.Keyword.LayoutTestFailure,
- BugzillaConstants.Keyword.MakingBotsRed,
- BugzillaConstants.Keyword.Regression
- ].join(', ');
- this.operatingSystem = this._computeOperatingSystem();
- this.platform = this._computePlatform();
- this.product = BugzillaConstants.Product.WebKit;
+ this.keywords += ', ' + WebKitBugzilla.Keyword.Regression;
this.title = this._createBugTitle();
this.url = ""
- this.version = BugzillaConstants.Version.Nightly;
}
FailingTestsBugForm.prototype = {
- domElement: function() {
- var form = NewBugForm.prototype.domElement.call(this);
- form.className = 'new-bug-form';
- form.target = '_blank';
- return form;
- },
-
- _computeOperatingSystem: function() {
- if (/Windows 7/.test(this._tester.name))
- return BugzillaConstants.OperatingSystem.Windows7;
- if (/Windows XP/.test(this._tester.name))
- return BugzillaConstants.OperatingSystem.WindowsXP;
- if (/SnowLeopard/.test(this._tester.name))
- return BugzillaConstants.OperatingSystem.SnowLeopard;
- if (/Leopard/.test(this._tester.name))
- return BugzillaConstants.OperatingSystem.Leopard;
- return '';
- },
-
- _computePlatform: function() {
- if (/Windows/.test(this._tester.name))
- return BugzillaConstants.Platform.PC;
- if (/Leopard/.test(this._tester.name))
- return BugzillaConstants.Platform.Macintosh;
- return '';
- },
-
_createBugDescription: function() {
var firstSuspectRevision = this._passingRevision() ? this._passingRevision() + 1 : this._failingRevision();
var lastSuspectRevision = this._failingRevision();
@@ -189,4 +119,4 @@
},
};
-FailingTestsBugForm.prototype.__proto__ = NewBugForm.prototype;
+FailingTestsBugForm.prototype.__proto__ = TestRelatedBugForm.prototype;
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm_unittests.js (91271 => 91272)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm_unittests.js 2011-07-19 17:40:17 UTC (rev 91271)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm_unittests.js 2011-07-19 18:11:39 UTC (rev 91272)
@@ -27,10 +27,6 @@
module('FailingTestsBugForm');
-function MockBuilder(name) {
- this.name = name;
-}
-
function createTestForm(testerName, failingBuildName, passingBuildName, failingTests) {
var mockBugzilla = {};
mockBugzilla.baseURL = '[BUGZILLA BASE URL]';
@@ -62,50 +58,12 @@
return new FailingTestsBugForm(mockBugzilla, mockTrac, mockBuilder, failingBuildName, passingBuildName, failingTests);
}
-test('component and keywords are set', 2, function() {
+test('keywords are set', 1, function() {
var form = createTestForm('Windows 7 Release (Tests)', 'r10 (5)', 'r8 (2)', ['css1/basic/class_as_selector.html']);
- equal(form.component, BugzillaConstants.Component.ToolsTests);
- deepEqual(form.keywords.split(', '), [BugzillaConstants.Keyword.LayoutTestFailure, BugzillaConstants.Keyword.MakingBotsRed, BugzillaConstants.Keyword.Regression]);
+ deepEqual(form.keywords.split(', '), [WebKitBugzilla.Keyword.LayoutTestFailure, WebKitBugzilla.Keyword.MakingBotsRed, WebKitBugzilla.Keyword.Regression]);
});
-const testers = {
- 'GTK Linux 32-bit Release': {
- operatingSystem: '',
- platform: '',
- },
- 'Leopard Intel Release (Tests)': {
- operatingSystem: BugzillaConstants.OperatingSystem.Leopard,
- platform: BugzillaConstants.Platform.Macintosh,
- },
- 'SnowLeopard Intel Release (Tests)': {
- operatingSystem: BugzillaConstants.OperatingSystem.SnowLeopard,
- platform: BugzillaConstants.Platform.Macintosh,
- },
- 'Windows 7 Release (Tests)': {
- operatingSystem: BugzillaConstants.OperatingSystem.Windows7,
- platform: BugzillaConstants.Platform.PC,
- },
- 'Windows XP Debug (Tests)': {
- operatingSystem: BugzillaConstants.OperatingSystem.WindowsXP,
- platform: BugzillaConstants.Platform.PC,
- },
-};
-
-test('operating system is deduced', 5, function() {
- for (var name in testers) {
- var form = createTestForm(name, 'r10 (5)', 'r8 (2)', ['css1/basic/class_as_selector.html']);
- equal(form.operatingSystem, testers[name].operatingSystem);
- }
-});
-
-test('platform is deduced', 5, function() {
- for (var name in testers) {
- var form = createTestForm(name, 'r10 (5)', 'r8 (2)', ['css1/basic/class_as_selector.html']);
- equal(form.platform, testers[name].platform);
- }
-});
-
const testCases = [
{
failingBuildName: 'r10 (5)',
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestRelatedBugForm.js (0 => 91272)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestRelatedBugForm.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestRelatedBugForm.js 2011-07-19 18:11:39 UTC (rev 91272)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+function TestRelatedBugForm(bugzilla, tester) {
+ NewBugForm.call(this, bugzilla);
+
+ this._tester = tester;
+
+ this.component = WebKitBugzilla.Component.ToolsTests;
+ this.keywords = [
+ WebKitBugzilla.Keyword.LayoutTestFailure,
+ WebKitBugzilla.Keyword.MakingBotsRed,
+ ].join(', ');
+ this.operatingSystem = this._computeOperatingSystem();
+ this.platform = this._computePlatform();
+ this.product = WebKitBugzilla.Product.WebKit;
+ this.version = WebKitBugzilla.Version.Nightly;
+}
+
+TestRelatedBugForm.prototype = {
+ domElement: function() {
+ var form = NewBugForm.prototype.domElement.call(this);
+ form.className = 'new-bug-form';
+ form.target = '_blank';
+ return form;
+ },
+
+ _computeOperatingSystem: function() {
+ if (/Windows 7/.test(this._tester.name))
+ return WebKitBugzilla.OperatingSystem.Windows7;
+ if (/Windows XP/.test(this._tester.name))
+ return WebKitBugzilla.OperatingSystem.WindowsXP;
+ if (/SnowLeopard/.test(this._tester.name))
+ return WebKitBugzilla.OperatingSystem.SnowLeopard;
+ if (/Leopard/.test(this._tester.name))
+ return WebKitBugzilla.OperatingSystem.Leopard;
+ return '';
+ },
+
+ _computePlatform: function() {
+ if (/Windows/.test(this._tester.name))
+ return WebKitBugzilla.Platform.PC;
+ if (/Leopard/.test(this._tester.name))
+ return WebKitBugzilla.Platform.Macintosh;
+ return '';
+ },
+};
+
+TestRelatedBugForm.prototype.__proto__ = NewBugForm.prototype;
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestRelatedBugForm_unittests.js (0 => 91272)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestRelatedBugForm_unittests.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestRelatedBugForm_unittests.js 2011-07-19 18:11:39 UTC (rev 91272)
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+(function() {
+
+module('TestRelatedBugForm');
+
+function createTestForm(testerName) {
+ var mockBugzilla = {};
+ mockBugzilla.baseURL = '[BUGZILLA BASE URL]';
+
+ var mockBuildbot = {};
+ mockBuildbot.parseBuildName = function(buildName) {
+ var match = /(\d+)/.exec(buildName);
+ return {
+ revision: parseInt(match[1], 10),
+ buildNumber: parseInt(match[2], 10),
+ };
+ };
+
+ var mockBuilder = {};
+ mockBuilder.name = testerName;
+ mockBuilder.buildbot = mockBuildbot;
+ mockBuilder.resultsPageURL = function(buildName) {
+ return '[RESULTS PAGE URL ' + this.name + ', ' + buildName + ']';
+ }
+
+ return new TestRelatedBugForm(mockBugzilla, mockBuilder);
+}
+
+test('component and keywords are set', 2, function() {
+ var form = createTestForm('Windows 7 Release (Tests)');
+
+ equal(form.component, WebKitBugzilla.Component.ToolsTests);
+ deepEqual(form.keywords.split(', '), [WebKitBugzilla.Keyword.LayoutTestFailure, WebKitBugzilla.Keyword.MakingBotsRed]);
+});
+
+const testers = {
+ 'GTK Linux 32-bit Release': {
+ operatingSystem: '',
+ platform: '',
+ },
+ 'Leopard Intel Release (Tests)': {
+ operatingSystem: WebKitBugzilla.OperatingSystem.Leopard,
+ platform: WebKitBugzilla.Platform.Macintosh,
+ },
+ 'SnowLeopard Intel Release (Tests)': {
+ operatingSystem: WebKitBugzilla.OperatingSystem.SnowLeopard,
+ platform: WebKitBugzilla.Platform.Macintosh,
+ },
+ 'Windows 7 Release (Tests)': {
+ operatingSystem: WebKitBugzilla.OperatingSystem.Windows7,
+ platform: WebKitBugzilla.Platform.PC,
+ },
+ 'Windows XP Debug (Tests)': {
+ operatingSystem: WebKitBugzilla.OperatingSystem.WindowsXP,
+ platform: WebKitBugzilla.Platform.PC,
+ },
+};
+
+test('operating system is deduced', 5, function() {
+ for (var name in testers) {
+ var form = createTestForm(name);
+ equal(form.operatingSystem, testers[name].operatingSystem);
+ }
+});
+
+test('platform is deduced', 5, function() {
+ for (var name in testers) {
+ var form = createTestForm(name);
+ equal(form.platform, testers[name].platform);
+ }
+});
+
+})();
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/WebKitBugzilla.js (0 => 91272)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/WebKitBugzilla.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/WebKitBugzilla.js 2011-07-19 18:11:39 UTC (rev 91272)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+const WebKitBugzilla = {
+ Component: {
+ ToolsTests: 'Tools / Tests',
+ },
+
+ Keyword: {
+ LayoutTestFailure: 'LayoutTestFailure',
+ MakingBotsRed: 'MakingBotsRed',
+ Regression: 'Regression',
+ },
+
+ OperatingSystem: {
+ Leopard: 'Mac OS X 10.5',
+ SnowLeopard: 'Mac OS X 10.6',
+ Windows7: 'Windows 7',
+ WindowsXP: 'Windows XP',
+ },
+
+ Platform: {
+ Macintosh: 'Macintosh',
+ PC: 'PC',
+ },
+
+ Product: {
+ WebKit: 'WebKit',
+ },
+
+ Version: {
+ Nightly: '528+ (Nightly Build)',
+ },
+};
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html (91271 => 91272)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html 2011-07-19 17:40:17 UTC (rev 91271)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html 2011-07-19 18:11:39 UTC (rev 91272)
@@ -28,10 +28,11 @@
<head>
<link rel="stylesheet" href=""
<script src=""
- <script src=""
<script src=""
+ <script src=""
<script src=""
+ <script src=""
<script src=""
<script src=""
<script src=""
@@ -42,7 +43,7 @@
<script src=""
<script src=""
<script src=""
-
+ <script src=""
<script src=""
<script>
var viewController = new ViewController(new WebKitBuildbot(), new Bugzilla('https://bugs.webkit.org/'), new Trac('http://trac.webkit.org/'));
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html (91271 => 91272)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html 2011-07-19 17:40:17 UTC (rev 91271)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html 2011-07-19 18:11:39 UTC (rev 91272)
@@ -13,6 +13,7 @@
<ol id="qunit-tests"></ol>
<!-- FIXME: We should have tests for these files! -->
<script src=""
+<script src=""
<script src=""
<script src=""
@@ -20,6 +21,12 @@
<script src=""
<script src=""
+<script src=""
+<script src=""
+
+<script src=""
+<script src=""
+
<script src=""
<script src=""
@@ -28,8 +35,5 @@
<script src=""
<script src=""
-
-<script src=""
-<script src=""
</body>
</html>
Modified: trunk/Tools/ChangeLog (91271 => 91272)
--- trunk/Tools/ChangeLog 2011-07-19 17:40:17 UTC (rev 91271)
+++ trunk/Tools/ChangeLog 2011-07-19 18:11:39 UTC (rev 91272)
@@ -1,3 +1,39 @@
+2011-07-19 Adam Roben <[email protected]>
+
+ Extract some of FailingTestsBugForm's code into a base class
+
+ Prep work for fixing <http://webkit.org/b/63728> TestFailures page should make it easy to
+ file bugs about flaky tests
+
+ Reviewed by Sam Weinig.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm.js:
+ Moved BugzillaConstants to new WebKitBugzilla file. Moved a bunch of other code from here to
+ TestRelatedBugForm.js.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm_unittests.js:
+ Moved some tests to TestRelatedBugForm_unittests.js.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestRelatedBugForm.js: Added.
+ (TestRelatedBugForm):
+ (TestRelatedBugForm.prototype.domElement):
+ (TestRelatedBugForm.prototype._computeOperatingSystem):
+ (TestRelatedBugForm.prototype._computePlatform):
+ Code came from FailingTestsBugForm.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestRelatedBugForm_unittests.js:
+ Added. Tests came from FailingTestsBugForm_unittests.js
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/WebKitBugzilla.js:
+ Added. Code came from FailingTestsBugForm.js.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html: Pull in
+ TestRelatedBugForm.js and WebKitBugzilla.js. Moved Bugzilla.js out of the list of files that
+ need to be pulled in early for parsing reasons.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html:
+ Pull in TestRelatedBugForm and tests and WebKitBugzilla.
+
2011-07-19 Sam Weinig <[email protected]>
Remove obsolete Mac NRWT test bots