Changeset 85346 in webkit
- Timestamp:
- Apr 29, 2011 12:14:42 PM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r85342 r85346 1 2011-04-29 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 handle flaky failures 6 https://bugs.webkit.org/show_bug.cgi?id=59820 7 8 Handle that actual can be a space-separated list of results 9 when we do retries. Also, show expected flaky tests that pass 10 in the unexpected passes table. 11 12 * fast/harness/resources/results-test.js: 13 * fast/harness/results.html: 14 1 15 2011-04-29 Mark Pilgrim <pilgrim@chromium.org> 2 16 -
trunk/LayoutTests/fast/harness/resources/results-test.js
r85260 r85346 221 221 runDefaultSingleRowTest('bar-flaky-fail-unexpected.html', 'PASS TEXT', 'IMAGE', false, '', 'expected actual diff '); 222 222 runDefaultSingleRowTest('bar-crash.html', 'TEXT', 'CRASH', false, 'stack ', ''); 223 runDefaultSingleRowTest('bar-audio.html', 'TEXT', 'AUDIO', false, 'expected a ctual', '');223 runDefaultSingleRowTest('bar-audio.html', 'TEXT', 'AUDIO', false, 'expected audio actual audio ', ''); 224 224 runDefaultSingleRowTest('bar-timeout.html', 'TEXT', 'TIMEOUT', false, 'expected actual diff ', ''); 225 225 runDefaultSingleRowTest('bar-image.html', 'TEXT', 'IMAGE', false, '', 'expected actual diff '); … … 238 238 results = mockResults(); 239 239 var subtree = results.tests['foo'] = {} 240 subtree['bar-flaky-pass.html'] = mockExpectation('PASS FAIL', 'PASS'); 241 runTest(results, function() { 242 // FIXME: should a PASS FAIL test that passes go in the unexpected passes table? 243 assertTrue(document.body.textContent.indexOf('foo/bar-flaky-pass.html') == -1); 240 subtree['bar-flaky-pass.html'] = mockExpectation('PASS TEXT', 'PASS'); 241 runTest(results, function() { 242 assertTrue(!document.getElementById('results-table')); 243 assertTrue(document.getElementById('passes-table')); 244 assertTrue(document.body.textContent.indexOf('foo/bar-flaky-pass.html') != -1); 245 }); 246 247 results = mockResults(); 248 var subtree = results.tests['foo'] = {} 249 subtree['bar-flaky-fail.html'] = mockExpectation('PASS TEXT', 'IMAGE PASS'); 250 runTest(results, function() { 251 assertTrue(document.getElementById('results-table')); 252 assertTrue(document.body.textContent.indexOf('bar-flaky-fail.html') != -1); 244 253 }); 245 254 … … 357 366 shouldUseTracLinks = oldShouldUseTracLinks; 358 367 368 runDefaultSingleRowTest('bar-flaky-crash.html', 'TEXT', 'TIMEOUT CRASH AUDIO', false, 'expected actual diff stack expected audio actual audio ', ''); 369 359 370 document.body.innerHTML = '<pre>' + g_log.join('\n') + '</pre>'; 360 371 } -
trunk/LayoutTests/fast/harness/results.html
r85254 r85346 320 320 return; 321 321 } 322 322 323 323 var expected = testObject.expected || 'PASS'; 324 testObject.isExpected = actual == 'SKIP';325 if ( !testObject.isExpected&& globalState().results.uses_expectations_file) {324 testObject.isExpected = true; 325 if (actual != 'SKIP' && globalState().results.uses_expectations_file) { 326 326 var expectedArray = expected.split(' '); 327 if (expectedArray.indexOf(actual) != -1) 328 testObject.isExpected = true; 329 else if (expectedArray.indexOf('FAIL') != -1) 330 testObject.isExpected = actual == 'IMAGE' || actual == 'TEXT' || actual == 'IMAGE+TEXT'; 331 } 332 333 if (actual == 'PASS' && expected != 'PASS' && !testObject.isExpected) 327 var actualArray = actual.split(' '); 328 for (var i = 0; i < actualArray.length; i++) { 329 var actualValue = actualArray[i]; 330 if (expectedArray.indexOf(actualValue) == -1 && 331 (expectedArray.indexOf('FAIL') == -1 || 332 (actualValue != 'IMAGE' && actualValue != 'TEXT' && actualValue != 'IMAGE+TEXT'))) 333 testObject.isExpected = false; 334 } 335 } 336 337 if (actual == 'PASS' && expected != 'PASS') 334 338 globalState().unexpectedPassTests.push(test); 335 339 } … … 337 341 function tableRow(testObject) 338 342 { 343 var row = '<tbody' 344 if (globalState().results.uses_expectations_file) 345 row += ' class="' + (testObject.isExpected ? 'expected' : '') + '"'; 346 row += '><tr>'; 347 348 row += '<td>' + testLink(testObject.name) + '</td>'; 349 350 var test_prefix = stripExtension(testObject.name); 351 row += '<td>'; 352 339 353 var actual = testObject.actual; 340 if (actual == 'PASS') 341 return ''; 342 343 var row = '<td>' + testLink(testObject.name) + '</td>'; 344 var test_prefix = stripExtension(testObject.name); 345 346 row += '<td>'; 347 348 if (actual == 'CRASH') 349 row += resultLink(test_prefix, '-stack.txt', 'stack'); 350 else if (actual == 'AUDIO') { 351 row += resultLink(test_prefix, '-expected.wav', 'expected'); 352 row += resultLink(test_prefix, '-actual.wav', 'actual'); 353 } else if (actual.indexOf('TEXT') != -1 || actual == 'TIMEOUT') { 354 if (actual.indexOf('TEXT') != -1 || actual.indexOf('TIMEOUT') != -1) { 354 355 // FIXME: only include timeout actual/expected results here if we actually spit out results for timeout tests. 355 356 globalState().hasTextFailures = true; … … 365 366 } 366 367 368 if (actual.indexOf('CRASH') != -1) 369 row += resultLink(test_prefix, '-stack.txt', 'stack'); 370 371 if (actual.indexOf('AUDIO') != -1) { 372 row += resultLink(test_prefix, '-expected.wav', 'expected audio'); 373 row += resultLink(test_prefix, '-actual.wav', 'actual audio'); 374 } 375 367 376 row += '</td><td>'; 368 377 … … 389 398 row += '<td>' + testObject.expected + '</td>'; 390 399 391 return '<tbody class="' + (testObject.isExpected ? 'expected' : '') + '"><tr>' + row + '</tr></tbody>'; 400 row += '</tr></tbody>'; 401 return row; 392 402 } 393 403
Note: See TracChangeset
for help on using the changeset viewer.