Diff
Copied: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm.js (from rev 91067, trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm.js) (0 => 91068)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm.js 2011-07-15 15:10:17 UTC (rev 91068)
@@ -0,0 +1,192 @@
+/*
+ * 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.
+ */
+
+// 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);
+
+ 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.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();
+
+ var endOfFirstSentence;
+ if (this._passingBuildName) {
+ endOfFirstSentence = 'started failing on ' + this._tester.name;
+ if (firstSuspectRevision === lastSuspectRevision)
+ endOfFirstSentence += ' in r' + firstSuspectRevision + ' <' + this._trac.changesetURL(firstSuspectRevision) + '>';
+ else
+ endOfFirstSentence += ' between r' + firstSuspectRevision + ' and r' + lastSuspectRevision + ' (inclusive)';
+ } else
+ endOfFirstSentence = (this._failingTests.length === 1 ? 'has' : 'have') + ' been failing on ' + this._tester.name + ' since at least r' + firstSuspectRevision + ' <' + this._trac.changesetURL(firstSuspectRevision) + '>';
+ var description;
+ if (this._failingTests.length === 1)
+ description = this._failingTests[0] + ' ' + endOfFirstSentence + '.\n\n';
+ else if (this._failingTests.length === 2)
+ description = this._failingTests.join(' and ') + ' ' + endOfFirstSentence + '.\n\n';
+ else {
+ description = 'The following tests ' + endOfFirstSentence + ':\n\n'
+ + this._failingTests.map(function(test) { return ' ' + test }).join('\n')
+ + '\n\n';
+ }
+ if (firstSuspectRevision !== lastSuspectRevision)
+ description += this._trac.logURL('trunk', firstSuspectRevision, lastSuspectRevision) + '\n\n';
+ if (this._passingBuildName)
+ description += this._tester.resultsPageURL(this._passingBuildName) + ' passed\n';
+ description += this._failingResultsHTMLURL() + ' failed\n';
+
+ return description;
+ },
+
+ _createBugTitle: function() {
+ // FIXME: When a newly-added test has been failing since its introduction, it isn't really a
+ // "regression". We should use a different title in that case. <http://webkit.org/b/61645>
+
+ var titlePrefix = 'REGRESSION (' + this._regressionRangeString() + '): ';
+ var titleSuffix = ' failing on ' + this._tester.name;
+ var title = titlePrefix + this._failingTests.join(', ') + titleSuffix;
+
+ if (title.length <= Bugzilla.maximumBugTitleLength)
+ return title;
+
+ var pathPrefix = longestCommonPathPrefix(this._failingTests);
+ if (pathPrefix) {
+ title = titlePrefix + this._failingTests.length + ' ' + pathPrefix + ' tests' + titleSuffix;
+ if (title.length <= Bugzilla.maximumBugTitleLength)
+ return title;
+ }
+
+ title = titlePrefix + this._failingTests.length + ' tests' + titleSuffix;
+
+ console.assert(title.length <= Bugzilla.maximumBugTitleLength);
+ return title;
+ },
+
+ _failingResultsHTMLURL: function() {
+ return this._tester.resultsPageURL(this._failingBuildName);
+ },
+
+ _failingRevision: function() {
+ return this._tester.buildbot.parseBuildName(this._failingBuildName).revision;
+ },
+
+ _passingRevision: function() {
+ if (!this._passingBuildName)
+ return null;
+ return this._tester.buildbot.parseBuildName(this._passingBuildName).revision;
+ },
+
+ _regressionRangeString: function() {
+ var failingRevision = this._failingRevision();
+ var passingRevision = this._passingRevision();
+ if (!passingRevision || failingRevision - passingRevision <= 1)
+ return 'r' + failingRevision;
+ return 'r' + passingRevision + '-r' + failingRevision;
+ },
+};
+
+FailingTestsBugForm.prototype.__proto__ = NewBugForm.prototype;
Copied: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm_unittests.js (from rev 91067, trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm_unittests.js) (0 => 91068)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm_unittests.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm_unittests.js 2011-07-15 15:10:17 UTC (rev 91068)
@@ -0,0 +1,213 @@
+/*
+ * 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('FailingTestsBugForm');
+
+function MockBuilder(name) {
+ this.name = name;
+}
+
+function createTestForm(testerName, failingBuildName, passingBuildName, failingTests) {
+ var mockBugzilla = {};
+ mockBugzilla.baseURL = '[BUGZILLA BASE URL]';
+
+ var mockTrac = {};
+ mockTrac.changesetURL = function(revisionNumber) {
+ return '[CHANGESET URL r' + revisionNumber + ']';
+ }
+ mockTrac.logURL = function(path, startRevision, endRevision) {
+ return '[LOG URL ' + path + ', r' + startRevision + ', r' + endRevision + ']';
+ }
+
+ 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 FailingTestsBugForm(mockBugzilla, mockTrac, mockBuilder, failingBuildName, passingBuildName, failingTests);
+}
+
+test('component and keywords are set', 2, 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]);
+});
+
+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)',
+ failingTests: [
+ 'css1/basic/class_as_selector.html',
+ ],
+ expectedDescription: 'css1/basic/class_as_selector.html has been failing on Windows 7 Release (Tests) since at least r10 <[CHANGESET URL r10]>.\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
+ expectedTitle: 'REGRESSION (r10): css1/basic/class_as_selector.html failing on Windows 7 Release (Tests)',
+ },
+ {
+ failingBuildName: 'r10 (5)',
+ passingBuildName: 'r9 (3)',
+ failingTests: [
+ 'css1/basic/class_as_selector.html',
+ ],
+ expectedDescription: 'css1/basic/class_as_selector.html started failing on Windows 7 Release (Tests) in r10 <[CHANGESET URL r10]>.\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r9 (3)] passed\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
+ expectedTitle: 'REGRESSION (r10): css1/basic/class_as_selector.html failing on Windows 7 Release (Tests)',
+ },
+ {
+ failingBuildName: 'r10 (5)',
+ passingBuildName: 'r8 (2)',
+ failingTests: [
+ 'css1/basic/class_as_selector.html',
+ ],
+ expectedDescription: 'css1/basic/class_as_selector.html started failing on Windows 7 Release (Tests) between r9 and r10 (inclusive).\n\n[LOG URL trunk, r9, r10]\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r8 (2)] passed\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
+ expectedTitle: 'REGRESSION (r8-r10): css1/basic/class_as_selector.html failing on Windows 7 Release (Tests)',
+ },
+ {
+ failingBuildName: 'r10 (5)',
+ passingBuildName: 'r8 (2)',
+ failingTests: [
+ 'css1/basic/class_as_selector.html',
+ 'fast/css/ex-after-font-variant.html',
+ ],
+ expectedDescription: 'css1/basic/class_as_selector.html and fast/css/ex-after-font-variant.html started failing on Windows 7 Release (Tests) between r9 and r10 (inclusive).\n\n[LOG URL trunk, r9, r10]\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r8 (2)] passed\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
+ expectedTitle: 'REGRESSION (r8-r10): css1/basic/class_as_selector.html, fast/css/ex-after-font-variant.html failing on Windows 7 Release (Tests)',
+ },
+ {
+ failingBuildName: 'r10 (5)',
+ passingBuildName: 'r8 (2)',
+ failingTests: [
+ 'css1/basic/class_as_selector1.html',
+ 'css1/basic/class_as_selector2.html',
+ 'css1/basic/class_as_selector3.html',
+ 'css1/basic/class_as_selector4.html',
+ 'css1/basic/class_as_selector5.html',
+ 'css1/basic/class_as_selector6.html',
+ 'css1/basic/class_as_selector7.html',
+ 'css1/basic/class_as_selector8.html',
+ ],
+ expectedDescription: 'The following tests started failing on Windows 7 Release (Tests) between r9 and r10 (inclusive):\n\n css1/basic/class_as_selector1.html\n css1/basic/class_as_selector2.html\n css1/basic/class_as_selector3.html\n css1/basic/class_as_selector4.html\n css1/basic/class_as_selector5.html\n css1/basic/class_as_selector6.html\n css1/basic/class_as_selector7.html\n css1/basic/class_as_selector8.html\n\n[LOG URL trunk, r9, r10]\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r8 (2)] passed\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
+ expectedTitle: 'REGRESSION (r8-r10): 8 css1/basic tests failing on Windows 7 Release (Tests)',
+ },
+ {
+ failingBuildName: 'r10 (5)',
+ passingBuildName: 'r8 (2)',
+ failingTests: [
+ 'css1/basic/class_as_selector1.html',
+ 'css1/basic/class_as_selector2.html',
+ 'css1/basic/class_as_selector3.html',
+ 'css1/basic/class_as_selector4.html',
+ 'css1/basic/class_as_selector5.html',
+ 'css1/basic/class_as_selector6.html',
+ 'css1/basic/class_as_selector7.html',
+ 'css1/basic/class_as_selector8.html',
+ 'css1/class_as_selector9.html',
+ ],
+ expectedTitle: 'REGRESSION (r8-r10): 9 css1 tests failing on Windows 7 Release (Tests)',
+ },
+ {
+ failingBuildName: 'r10 (5)',
+ passingBuildName: 'r8 (2)',
+ failingTests: [
+ 'css1/basic/class_as_selector1.html',
+ 'css1/basic/class_as_selector2.html',
+ 'css1/basic/class_as_selector3.html',
+ 'css1/basic/class_as_selector4.html',
+ 'css1/basic/class_as_selector5.html',
+ 'css1/basic/class_as_selector6.html',
+ 'css1/basic/class_as_selector7.html',
+ 'css1/basic/class_as_selector8.html',
+ 'css1/class_as_selector9.html',
+ 'fast/css/ex-after-font-variant.html',
+ ],
+ expectedTitle: 'REGRESSION (r8-r10): 10 tests failing on Windows 7 Release (Tests)',
+ },
+];
+
+test('titles', 7, function() {
+ for (var i = 0; i < testCases.length; ++i) {
+ var form = createTestForm('Windows 7 Release (Tests)', testCases[i].failingBuildName, testCases[i].passingBuildName, testCases[i].failingTests);
+ equal(form.title, testCases[i].expectedTitle);
+ }
+});
+
+test('descriptions', 5, function() {
+ for (var i = 0; i < testCases.length; ++i) {
+ if (!('expectedDescription' in testCases[i]))
+ continue;
+ var form = createTestForm('Windows 7 Release (Tests)', testCases[i].failingBuildName, testCases[i].passingBuildName, testCases[i].failingTests);
+ equal(form.description, testCases[i].expectedDescription);
+ }
+});
+
+})();
Deleted: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm.js (91067 => 91068)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm.js 2011-07-15 14:38:13 UTC (rev 91067)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm.js 2011-07-15 15:10:17 UTC (rev 91068)
@@ -1,192 +0,0 @@
-/*
- * 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.
- */
-
-// 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 TestFailureBugForm(bugzilla, trac, tester, failingBuildName, passingBuildName, failingTests) {
- NewBugForm.call(this, bugzilla);
-
- 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.title = this._createBugTitle();
- this.url = ""
- this.version = BugzillaConstants.Version.Nightly;
-}
-
-TestFailureBugForm.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();
-
- var endOfFirstSentence;
- if (this._passingBuildName) {
- endOfFirstSentence = 'started failing on ' + this._tester.name;
- if (firstSuspectRevision === lastSuspectRevision)
- endOfFirstSentence += ' in r' + firstSuspectRevision + ' <' + this._trac.changesetURL(firstSuspectRevision) + '>';
- else
- endOfFirstSentence += ' between r' + firstSuspectRevision + ' and r' + lastSuspectRevision + ' (inclusive)';
- } else
- endOfFirstSentence = (this._failingTests.length === 1 ? 'has' : 'have') + ' been failing on ' + this._tester.name + ' since at least r' + firstSuspectRevision + ' <' + this._trac.changesetURL(firstSuspectRevision) + '>';
- var description;
- if (this._failingTests.length === 1)
- description = this._failingTests[0] + ' ' + endOfFirstSentence + '.\n\n';
- else if (this._failingTests.length === 2)
- description = this._failingTests.join(' and ') + ' ' + endOfFirstSentence + '.\n\n';
- else {
- description = 'The following tests ' + endOfFirstSentence + ':\n\n'
- + this._failingTests.map(function(test) { return ' ' + test }).join('\n')
- + '\n\n';
- }
- if (firstSuspectRevision !== lastSuspectRevision)
- description += this._trac.logURL('trunk', firstSuspectRevision, lastSuspectRevision) + '\n\n';
- if (this._passingBuildName)
- description += this._tester.resultsPageURL(this._passingBuildName) + ' passed\n';
- description += this._failingResultsHTMLURL() + ' failed\n';
-
- return description;
- },
-
- _createBugTitle: function() {
- // FIXME: When a newly-added test has been failing since its introduction, it isn't really a
- // "regression". We should use a different title in that case. <http://webkit.org/b/61645>
-
- var titlePrefix = 'REGRESSION (' + this._regressionRangeString() + '): ';
- var titleSuffix = ' failing on ' + this._tester.name;
- var title = titlePrefix + this._failingTests.join(', ') + titleSuffix;
-
- if (title.length <= Bugzilla.maximumBugTitleLength)
- return title;
-
- var pathPrefix = longestCommonPathPrefix(this._failingTests);
- if (pathPrefix) {
- title = titlePrefix + this._failingTests.length + ' ' + pathPrefix + ' tests' + titleSuffix;
- if (title.length <= Bugzilla.maximumBugTitleLength)
- return title;
- }
-
- title = titlePrefix + this._failingTests.length + ' tests' + titleSuffix;
-
- console.assert(title.length <= Bugzilla.maximumBugTitleLength);
- return title;
- },
-
- _failingResultsHTMLURL: function() {
- return this._tester.resultsPageURL(this._failingBuildName);
- },
-
- _failingRevision: function() {
- return this._tester.buildbot.parseBuildName(this._failingBuildName).revision;
- },
-
- _passingRevision: function() {
- if (!this._passingBuildName)
- return null;
- return this._tester.buildbot.parseBuildName(this._passingBuildName).revision;
- },
-
- _regressionRangeString: function() {
- var failingRevision = this._failingRevision();
- var passingRevision = this._passingRevision();
- if (!passingRevision || failingRevision - passingRevision <= 1)
- return 'r' + failingRevision;
- return 'r' + passingRevision + '-r' + failingRevision;
- },
-};
-
-TestFailureBugForm.prototype.__proto__ = NewBugForm.prototype;
Deleted: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm_unittests.js (91067 => 91068)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm_unittests.js 2011-07-15 14:38:13 UTC (rev 91067)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm_unittests.js 2011-07-15 15:10:17 UTC (rev 91068)
@@ -1,213 +0,0 @@
-/*
- * 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('TestFailureBugForm');
-
-function MockBuilder(name) {
- this.name = name;
-}
-
-function createTestForm(testerName, failingBuildName, passingBuildName, failingTests) {
- var mockBugzilla = {};
- mockBugzilla.baseURL = '[BUGZILLA BASE URL]';
-
- var mockTrac = {};
- mockTrac.changesetURL = function(revisionNumber) {
- return '[CHANGESET URL r' + revisionNumber + ']';
- }
- mockTrac.logURL = function(path, startRevision, endRevision) {
- return '[LOG URL ' + path + ', r' + startRevision + ', r' + endRevision + ']';
- }
-
- 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 TestFailureBugForm(mockBugzilla, mockTrac, mockBuilder, failingBuildName, passingBuildName, failingTests);
-}
-
-test('component and keywords are set', 2, 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]);
-});
-
-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)',
- failingTests: [
- 'css1/basic/class_as_selector.html',
- ],
- expectedDescription: 'css1/basic/class_as_selector.html has been failing on Windows 7 Release (Tests) since at least r10 <[CHANGESET URL r10]>.\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
- expectedTitle: 'REGRESSION (r10): css1/basic/class_as_selector.html failing on Windows 7 Release (Tests)',
- },
- {
- failingBuildName: 'r10 (5)',
- passingBuildName: 'r9 (3)',
- failingTests: [
- 'css1/basic/class_as_selector.html',
- ],
- expectedDescription: 'css1/basic/class_as_selector.html started failing on Windows 7 Release (Tests) in r10 <[CHANGESET URL r10]>.\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r9 (3)] passed\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
- expectedTitle: 'REGRESSION (r10): css1/basic/class_as_selector.html failing on Windows 7 Release (Tests)',
- },
- {
- failingBuildName: 'r10 (5)',
- passingBuildName: 'r8 (2)',
- failingTests: [
- 'css1/basic/class_as_selector.html',
- ],
- expectedDescription: 'css1/basic/class_as_selector.html started failing on Windows 7 Release (Tests) between r9 and r10 (inclusive).\n\n[LOG URL trunk, r9, r10]\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r8 (2)] passed\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
- expectedTitle: 'REGRESSION (r8-r10): css1/basic/class_as_selector.html failing on Windows 7 Release (Tests)',
- },
- {
- failingBuildName: 'r10 (5)',
- passingBuildName: 'r8 (2)',
- failingTests: [
- 'css1/basic/class_as_selector.html',
- 'fast/css/ex-after-font-variant.html',
- ],
- expectedDescription: 'css1/basic/class_as_selector.html and fast/css/ex-after-font-variant.html started failing on Windows 7 Release (Tests) between r9 and r10 (inclusive).\n\n[LOG URL trunk, r9, r10]\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r8 (2)] passed\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
- expectedTitle: 'REGRESSION (r8-r10): css1/basic/class_as_selector.html, fast/css/ex-after-font-variant.html failing on Windows 7 Release (Tests)',
- },
- {
- failingBuildName: 'r10 (5)',
- passingBuildName: 'r8 (2)',
- failingTests: [
- 'css1/basic/class_as_selector1.html',
- 'css1/basic/class_as_selector2.html',
- 'css1/basic/class_as_selector3.html',
- 'css1/basic/class_as_selector4.html',
- 'css1/basic/class_as_selector5.html',
- 'css1/basic/class_as_selector6.html',
- 'css1/basic/class_as_selector7.html',
- 'css1/basic/class_as_selector8.html',
- ],
- expectedDescription: 'The following tests started failing on Windows 7 Release (Tests) between r9 and r10 (inclusive):\n\n css1/basic/class_as_selector1.html\n css1/basic/class_as_selector2.html\n css1/basic/class_as_selector3.html\n css1/basic/class_as_selector4.html\n css1/basic/class_as_selector5.html\n css1/basic/class_as_selector6.html\n css1/basic/class_as_selector7.html\n css1/basic/class_as_selector8.html\n\n[LOG URL trunk, r9, r10]\n\n[RESULTS PAGE URL Windows 7 Release (Tests), r8 (2)] passed\n[RESULTS PAGE URL Windows 7 Release (Tests), r10 (5)] failed\n',
- expectedTitle: 'REGRESSION (r8-r10): 8 css1/basic tests failing on Windows 7 Release (Tests)',
- },
- {
- failingBuildName: 'r10 (5)',
- passingBuildName: 'r8 (2)',
- failingTests: [
- 'css1/basic/class_as_selector1.html',
- 'css1/basic/class_as_selector2.html',
- 'css1/basic/class_as_selector3.html',
- 'css1/basic/class_as_selector4.html',
- 'css1/basic/class_as_selector5.html',
- 'css1/basic/class_as_selector6.html',
- 'css1/basic/class_as_selector7.html',
- 'css1/basic/class_as_selector8.html',
- 'css1/class_as_selector9.html',
- ],
- expectedTitle: 'REGRESSION (r8-r10): 9 css1 tests failing on Windows 7 Release (Tests)',
- },
- {
- failingBuildName: 'r10 (5)',
- passingBuildName: 'r8 (2)',
- failingTests: [
- 'css1/basic/class_as_selector1.html',
- 'css1/basic/class_as_selector2.html',
- 'css1/basic/class_as_selector3.html',
- 'css1/basic/class_as_selector4.html',
- 'css1/basic/class_as_selector5.html',
- 'css1/basic/class_as_selector6.html',
- 'css1/basic/class_as_selector7.html',
- 'css1/basic/class_as_selector8.html',
- 'css1/class_as_selector9.html',
- 'fast/css/ex-after-font-variant.html',
- ],
- expectedTitle: 'REGRESSION (r8-r10): 10 tests failing on Windows 7 Release (Tests)',
- },
-];
-
-test('titles', 7, function() {
- for (var i = 0; i < testCases.length; ++i) {
- var form = createTestForm('Windows 7 Release (Tests)', testCases[i].failingBuildName, testCases[i].passingBuildName, testCases[i].failingTests);
- equal(form.title, testCases[i].expectedTitle);
- }
-});
-
-test('descriptions', 5, function() {
- for (var i = 0; i < testCases.length; ++i) {
- if (!('expectedDescription' in testCases[i]))
- continue;
- var form = createTestForm('Windows 7 Release (Tests)', testCases[i].failingBuildName, testCases[i].passingBuildName, testCases[i].failingTests);
- equal(form.description, testCases[i].expectedDescription);
- }
-});
-
-})();
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js (91067 => 91068)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-07-15 14:38:13 UTC (rev 91067)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js 2011-07-15 15:10:17 UTC (rev 91068)
@@ -385,7 +385,7 @@
closedList.appendChildren(closedBugs.map(bugToListItem));
});
- var bugForm = new TestFailureBugForm(this._bugzilla, this._trac, tester, failingBuildName, passingBuildName, failingTests);
+ var bugForm = new FailingTestsBugForm(this._bugzilla, this._trac, tester, failingBuildName, passingBuildName, failingTests);
var form = bugForm.domElement();
result.appendChild(form);
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html (91067 => 91068)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html 2011-07-15 14:38:13 UTC (rev 91067)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html 2011-07-15 15:10:17 UTC (rev 91068)
@@ -27,19 +27,20 @@
<html>
<head>
<link rel="stylesheet" href=""
+ <script src=""
<script src=""
+ <script src=""
+ <script src=""
+
<script src=""
<script src=""
<script src=""
<script src=""
<script src=""
<script src=""
- <script src=""
<script src=""
<script src=""
- <script src=""
<script src=""
- <script src=""
<script src=""
<script src=""
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html (91067 => 91068)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html 2011-07-15 14:38:13 UTC (rev 91067)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html 2011-07-15 15:10:17 UTC (rev 91068)
@@ -29,7 +29,7 @@
<script src=""
<script src=""
-<script src=""
-<script src=""
+<script src=""
+<script src=""
</body>
</html>
Modified: trunk/Tools/ChangeLog (91067 => 91068)
--- trunk/Tools/ChangeLog 2011-07-15 14:38:13 UTC (rev 91067)
+++ trunk/Tools/ChangeLog 2011-07-15 15:10:17 UTC (rev 91068)
@@ -1,3 +1,24 @@
+2011-07-15 Adam Roben <[email protected]>
+
+ Rename TestFailureBugForm to FailingTestsBugForm
+
+ The new name will match better with a forthcoming FlakyTestBugForm class.
+
+ Fixes <http://webkit.org/b/64598> TestFailures page's TestFailureBugForm class has a bad
+ name
+
+ Reviewed by Daniel Bates.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm.js: Renamed from Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm.js.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FailingTestsBugForm_unittests.js: Renamed from Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailureBugForm_unittests.js.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html:
+ Updated for renames.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html: Ditto, and
+ reordered <script>s to put files which others depend on for parsing first.
+
2011-07-15 Adam Barth <[email protected]>
NRWT stores the Chromium revision number in full_results.json