Changeset 91541 in webkit
- Timestamp:
- Jul 21, 2011 5:48:07 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r91538 r91541 1 2011-07-21 Ojan Vafai <ojan@chromium.org> 2 3 simplify gtest display now that we strip modifiers from the JSON 4 https://bugs.webkit.org/show_bug.cgi?id=64990 5 6 Reviewed by Adam Barth. 7 8 Now that names are normalized, we can remove all the code that 9 handles gtest name changes (e.g. for adding modifiers like DISABLED_). 10 Instead, if you try to list a test with a modifier in it, we need 11 to strip the modifier so we get the normalized value. 12 13 We also get rid of the concept of extra/missing expectations for gtests. 14 In a patch soon, we'll stop showing extra/missing expectations from the UI 15 entirely and only leave it for the special updating test_expectations.txt 16 view of the dashboard, which doesn't apply to gtests. 17 18 * TestResultServer/static-dashboards/flakiness_dashboard.html: 19 * TestResultServer/static-dashboards/flakiness_dashboard_tests.js: 20 1 21 2011-07-21 Adam Barth <abarth@webkit.org> 2 22 -
trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html
r91518 r91541 315 315 var FORWARD = 'forward'; 316 316 var BACKWARD = 'backward'; 317 var GTEST_FLAKY_MARKER = '\.FLAKY_'; 318 var GTEST_FAILS_MARKER = '\.FAILS_'; 317 var GTEST_MODIFIERS = ['FLAKY', 'FAILS', 'MAYBE', 'DISABLED']; 319 318 var TEST_URL_BASE_PATH_TRAC = 'http://trac.webkit.org/browser/trunk/LayoutTests/'; 320 319 var TEST_URL_BASE_PATH = "http://svn.webkit.org/repository/webkit/trunk/LayoutTests/"; … … 612 611 } 613 612 614 function individualTestsForSubstringList()613 function substringList() 615 614 { 616 615 // Convert windows slashes to unix slashes. … … 619 618 var testList = tests.split(separator); 620 619 621 if (!isLayoutTestResults()) { 622 testList.forEach(function(element) { 623 // Make sure to search for the flaky/fails and non-flaky/non-fails 624 // names for a test. 625 // e.g. for test Foo.Bar, also search for Foo.FLAKY_Bar. 626 if (stringContains(element, GTEST_FLAKY_MARKER)) 627 testList.push(element.replace(GTEST_FLAKY_MARKER, '.')); 628 else if (stringContains(element, GTEST_FAILS_MARKER)) 629 testList.push(element.replace(GTEST_FAILS_MARKER, '.')); 630 else { 631 testList.push(element.replace('.', GTEST_FLAKY_MARKER)); 632 testList.push(element.replace('.', GTEST_FAILS_MARKER)); 633 } 620 if (isLayoutTestResults()) 621 return testList; 622 623 var testListWithoutModifiers = []; 624 testList.forEach(function(path) { 625 GTEST_MODIFIERS.forEach(function(modifier) { 626 path = path.replace('.' + modifier + '_', '.'); 634 627 }); 635 } 628 testListWithoutModifiers.push(path); 629 }); 630 return testListWithoutModifiers; 631 } 632 633 function individualTestsForSubstringList() 634 { 635 var testList = substringList(); 636 636 637 637 // Put the tests into an object first and then move them into an array … … 1162 1162 } 1163 1163 1164 } else {1165 var isMarkedFlaky = stringContains(resultsForTest.test, GTEST_FLAKY_MARKER);1166 if (resultsForTest.isFlaky && !isMarkedFlaky)1167 missingExpectations.push('FLAKY');1168 else if (!resultsForTest.isFlaky && isMarkedFlaky)1169 extraExpectations.push('FLAKY');1170 1164 } 1171 1165 … … 1553 1547 var a = a[column] ? String(a[column]) : 'z'; 1554 1548 var b = b[column] ? String(b[column]) : 'z'; 1555 1556 // For gtest tests, we make them as flaky/failing by prefixing the1557 // test name with FLAKY_ or FAILS_, resulting in three possible entries1558 // for the test.1559 // Place flaky/fails tests next to their non-flaky counterparts.1560 // FIXME: Merge the non-flaky/non-fails test with the flaky/fails1561 // one so there's only a single entry per test.1562 if (!isLayoutTestResults()) {1563 a = a.replace(GTEST_FLAKY_MARKER, '.');1564 b = b.replace(GTEST_FLAKY_MARKER, '.');1565 a = a.replace(GTEST_FAILS_MARKER, '.');1566 b = b.replace(GTEST_FAILS_MARKER, '.');1567 }1568 1549 1569 1550 if (a < b) … … 2182 2163 expectationsContainer.appendChild(container); 2183 2164 for (var i = 0; i < failures.length; i++) { 2165 // FIXME: This doesn't seem to work anymore. Did the paths change? 2166 // Once that's resolved, see if we need to try each GTEST_MODIFIERS prefix as well. 2184 2167 var pathToLog = builderMaster(builder).getLogPath(builder, failures[i]) + pathToFailureLog(test); 2185 2168 appendNonWebKitResults(container, pathToLog); -
trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.js
r91313 r91541 303 303 } 304 304 305 function testSubstringList() 306 { 307 g_currentState.testType = 'gtest'; 308 g_currentState.tests = 'test.FLAKY_foo test.FAILS_foo1 test.DISABLED_foo2 test.MAYBE_foo3 test.foo4'; 309 assertEquals(substringList().toString(), 'test.foo,test.foo1,test.foo2,test.foo3,test.foo4'); 310 311 g_currentState.testType = 'layout-tests'; 312 g_currentState.tests = 'foo/bar.FLAKY_foo.html'; 313 assertEquals(substringList().toString(), 'foo/bar.FLAKY_foo.html'); 314 315 } 316 305 317 function runTests() 306 318 {
Note: See TracChangeset
for help on using the changeset viewer.