Skip to content

Commit

Permalink
[build.webkit.org] Fix unit tests
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=264961
rdar://118514801

Reviewed by Ryan Haddad.

Use MockCommitTracker and deprecate Trac entirely. Remove SVN support as well.

* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index-expected.txt:
Rebase test results.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/index.html:
Add MockCommitTracker, remote MockTrac.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/MockCommitStore.js: Added.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/MockCommits.js: Removed.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/MockTrac.js: Removed.
* Tools/CISupport/build-webkit-org/public_html/dashboard/Scripts/tests/resources/tests.js:
Update tests.

Canonical link: https://commits.webkit.org/270839@main
  • Loading branch information
JonWBedard committed Nov 16, 2023
1 parent 57afbaf commit 62d17dc
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 341 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
WebKit Bot Watcher's Dashboard QUnit Test Runner noglobalsnotrycatch
Hide passed tests
Trac: _parseRevisionFromURL (0, 3, 3)Rerun
Trac: nextRevision (0, 2, 2)Rerun
Trac: indexOfRevision (0, 1, 1)Rerun
Trac: commitsOnBranchLaterThanRevision (0, 1, 1)Rerun
Trac: commitsOnBranchLaterThanRevision no commits (0, 1, 1)Rerun
Trac: commitsOnBranchInRevisionRange (0, 1, 1)Rerun
Trac: revisionURL (0, 2, 2)Rerun
Trac: revisionURL with Trac Identifier (0, 2, 2)Rerun
Trac: _xmlTimelineURL (0, 2, 2)Rerun
Trac: _xmlTimelineURL with Trac Identifier (0, 2, 2)Rerun
BuildBotQueueView: _appendPendingRevisionCount (0, 1, 1)Rerun
BuildBotQueueView: _popoverLinesForCommitRange (0, 1, 1)Rerun
BuildBotQueueView: _presentPopoverForPendingCommits (0, 1, 1)Rerun
BuildBotQueueView: _presentPopoverForPendingCommits no pending commits (0, 1, 1)Rerun
BuildBotQueueView: _revisionContentWithPopoverForIteration (0, 2, 2)Rerun
BuildBotQueueView: _revisionContentWithPopoverForIteration has previousIteration (0, 2, 2)Rerun
BuildBotQueueView: _formatRevisionForDisplay Subversion (0, 1, 1)Rerun
BuildBotQueueView: _formatRevisionForDisplay Git (0, 1, 1)Rerun
BuildBotQueueView: _popoverContentForJavaScriptCoreTestRegressions load failure UI test (0, 3, 3)Rerun
BuildBotQueueView: _presentPopoverForJavaScriptCoreTestRegressions including loading (0, 0, 0)Rerun
Expand All @@ -27,7 +16,6 @@ BuildBotQueue: compareIterations by loaded (one revision missing) (0, 2, 2)Rerun
BuildBotQueue: compareIterations by loaded (same revision) (0, 2, 2)Rerun
BuildBotQueue: compareIterations by id (revisions not specified) (0, 3, 3)Rerun
BuildBotQueue: compareIterations by id (same revision) (0, 3, 3)Rerun
BuildBotQueue: compareIterationsByRevisions (0, 3, 3)Rerun
33022@main
idbuild #1javascriptcore test failures
Loading…
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@
<script src="../BubbleQueueView.js"></script>
<script src="../StatusLineView.js"></script>
<script src="../Settings.js"></script>
<script src="../Trac.js"></script>
<script src="../CommitStore.js"></script>
<script src="../../../../../../../Source/ThirdParty/qunit/qunit/qunit.js"></script>
<script src="resources/MockTrac.js"></script>
<script src="resources/MockBuildbot.js"></script>
<script src="resources/MockBuildbotQueue.js"></script>
<script src="resources/MockBuildbotQueueView.js"></script>
<script src="resources/MockBuildbotTestResults.js"></script>
<script src="resources/MockCommits.js"></script>
<script src="resources/MockCommitStore.js"></script>
<script src="resources/tests.js"></script>

</head>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (C) 2022 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.
*/

MockCommitStore = function(url)
{
CommitStore.call(this);

const identifier = '33022@main';
const hash = '4c24d7e5e167b694c4fe729969548987bee8d953';
const commit = {
'identifier': identifier,
'hash': hash,
'timestamp': 1234457296,
'order': 0,
};

this.commitsByBranch = {'main': [commit]};
this.indexForCommit = {identifier: 0, hash: 0};
this.commitsByRef = {identifier: commit, hash: commit};
this.useIdentifiers = true;
};

BaseObject.addConstructorFunctions(MockCommitStore);

MockCommitStore.prototype = {
constructor: MockCommitStore,
__proto__: CommitStore.prototype,

urlFor: function(ref) {
return `https://commits.webkit.org/${ref}`;
},
fetch: function(base, count) {},
};

This file was deleted.

This file was deleted.

Loading

0 comments on commit 62d17dc

Please sign in to comment.