Commit 555707ea authored by ojan@chromium.org's avatar ojan@chromium.org

Remove dupes when generating the list of tests to show in the

layout test dashboard. Also, if a path does not match any failing
tests, then assume it's a full path so we can still show it's expectations.
Review URL: http://codereview.chromium.org/334030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30104 0039d316-1c4b-4281-b951-d872f2087c98
parent 59117beb
...@@ -514,7 +514,10 @@ ...@@ -514,7 +514,10 @@
var separator = stringContains(currentState.tests, ' ') ? ' ' : ','; var separator = stringContains(currentState.tests, ' ') ? ' ' : ',';
var testList = currentState.tests.split(separator); var testList = currentState.tests.split(separator);
var tests = [];
// Put the tests into an object first and then move them into an array
// as a way of deduping.
var tests = {};
for (var i = 0; i < testList.length; i++) { for (var i = 0; i < testList.length; i++) {
var path = testList[i]; var path = testList[i];
...@@ -523,13 +526,26 @@ ...@@ -523,13 +526,26 @@
continue; continue;
var allTests = getAllTests(); var allTests = getAllTests();
var hasAnyMatches = false;
for (var test in allTests) { for (var test in allTests) {
if (caseInsensitiveContains(test, path)) { if (caseInsensitiveContains(test, path)) {
tests.push(test); tests[test] = 1;
hasAnyMatches = true;
} }
} }
// If a path doesn't match any tests, then assume it's a full path
// to a test that passes on all builders.
if (!hasAnyMatches) {
tests[path] = 1;
}
}
var testsArray = [];
for (var test in tests) {
testsArray.push(test);
} }
return tests; return testsArray;
} }
function getAllTestsWithIncorrectExpectations() { function getAllTestsWithIncorrectExpectations() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment