Changeset 99818 in webkit
- Timestamp:
- Nov 9, 2011, 11:39:50 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/harness/resources/results-test.js (modified) (1 diff)
-
LayoutTests/fast/harness/results.html (modified) (2 diffs)
-
LayoutTests/platform/chromium/fast/harness/results-expected.txt (modified) (4 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (modified) (2 diffs)
-
Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r99817 r99818 1 2011-11-09 Hayato Ito <hayato@chromium.org> 2 3 [NRWT] Make results.html aware of reference filename in reftests. 4 https://bugs.webkit.org/show_bug.cgi?id=71574 5 6 Reviewed by Ryosuke Niwa. 7 8 If a reference filename is different from the default one, include that in result summary 9 so results.html can link to the correct reference file. 10 11 * fast/harness/resources/results-test.js: 12 * fast/harness/results.html: 13 * platform/chromium/fast/harness/results-expected.txt: 14 1 15 2011-11-09 Andrew Scherkus <scherkus@chromium.org> 2 16 -
trunk/LayoutTests/fast/harness/resources/results-test.js
r98031 r99818 264 264 results.tests['bar-reftest-mismatch.html'].is_mismatch_reftest = true; 265 265 runSingleRowTest(results, false, '', 'ref mismatch html actual '); 266 267 results = mockResults(); 268 results.tests['bar-reftest.html'] = mockExpectation('PASS', 'IMAGE', 1); 269 results.tests['bar-reftest.html'].is_reftest = true; 270 results.tests['bar-reftest.html'].ref_file = 'common.html'; 271 runSingleRowTest(results, false, '', 'ref html images diff (1%) '); 272 runTest(results, function() { 273 assertTrue(document.getElementsByClassName('result-link')[0].getAttribute('href') == 'common.html'); 274 }); 275 276 results = mockResults(); 277 results.tests['bar-reftest.html'] = mockExpectation('PASS', 'IMAGE'); 278 results.tests['bar-reftest.html'].is_mismatch_reftest = true; 279 results.tests['bar-reftest.html'].ref_file = 'common.html'; 280 runSingleRowTest(results, false, '', 'ref mismatch html actual '); 281 runTest(results, function() { 282 assertTrue(document.getElementsByClassName('result-link')[0].getAttribute('href') == 'common.html'); 283 }); 266 284 267 285 results = mockResults(); -
trunk/LayoutTests/fast/harness/results.html
r98031 r99818 407 407 function resultLink(testPrefix, suffix, contents) 408 408 { 409 return '<a class=result-link href="' + testPrefix + suffix + '" data-prefix="' + testPrefix + '">' + contents + '</a> '; 409 return referenceLink(testPrefix, testPrefix + suffix, contents); 410 } 411 412 function referenceLink(testPrefix, reference_filename, contents) 413 { 414 return '<a class=result-link href="' + reference_filename + '" data-prefix="' + testPrefix + '">' + contents + '</a> '; 410 415 } 411 416 … … 542 547 543 548 if (testObject.is_mismatch_reftest) { 544 row += resultLink(test_prefix, '-expected-mismatch.html', 'ref mismatch html') + 545 resultLink(test_prefix, '-actual.png', 'actual'); 549 if (testObject.ref_file) 550 row += referenceLink(test_prefix, testObject.ref_file, 'ref mismatch html'); 551 else 552 row += resultLink(test_prefix, '-expected-mismatch.html', 'ref mismatch html'); 553 row += resultLink(test_prefix, '-actual.png', 'actual'); 546 554 } else { 547 if (testObject.is_reftest) 548 row += resultLink(test_prefix, '-expected.html', 'ref html'); 549 555 if (testObject.is_reftest) { 556 if (testObject.ref_file) 557 row += referenceLink(test_prefix, testObject.ref_file, 'ref html'); 558 else 559 row += resultLink(test_prefix, '-expected.html', 'ref html'); 560 } 550 561 if (globalState().shouldToggleImages) { 551 562 row += resultLink(test_prefix, '-diffs.html', 'images'); -
trunk/LayoutTests/platform/chromium/fast/harness/results-expected.txt
r98031 r99818 97 97 TEST-16: PASS 98 98 TEST-16: PASS 99 TEST-17: PASS 100 TEST-17: PASS 99 TEST-16: PASS 100 TEST-16: PASS 101 TEST-16: PASS 101 102 TEST-17: PASS 102 103 TEST-18: PASS … … 104 105 TEST-18: PASS 105 106 TEST-18: PASS 107 TEST-18: PASS 108 TEST-18: PASS 106 109 TEST-19: PASS 107 TEST-19: PASS108 TEST-20: PASS109 TEST-20: PASS110 110 TEST-20: PASS 111 111 TEST-20: PASS … … 113 113 TEST-21: PASS 114 114 TEST-21: PASS 115 TEST-21: PASS 116 TEST-22: PASS 117 TEST-22: PASS 115 118 TEST-22: PASS 116 119 TEST-22: PASS 117 120 TEST-23: PASS 121 TEST-23: PASS 122 TEST-24: PASS 123 TEST-24: PASS 124 TEST-24: PASS 118 125 TEST-24: PASS 119 126 TEST-24: PASS 120 127 TEST-25: PASS 128 TEST-25: PASS 129 TEST-26: PASS 121 130 TEST-26: PASS 122 131 TEST-27: PASS 123 132 TEST-28: PASS 124 133 TEST-28: PASS 125 TEST-28: PASS126 TEST-29: PASS127 134 TEST-29: PASS 128 135 TEST-30: PASS 129 TEST-30: PASS130 TEST-30: PASS131 TEST-30: PASS132 TEST-30: PASS133 TEST-30: PASS134 TEST-30: PASS135 TEST-30: PASS136 TEST-30: PASS137 TEST-30: PASS138 TEST-30: PASS139 TEST-30: PASS140 TEST-30: PASS141 TEST-30: PASS142 TEST-30: PASS143 TEST-30: PASS144 136 TEST-31: PASS 145 TEST-31: PASS146 TEST-31: PASS147 TEST-31: PASS148 TEST-31: PASS149 TEST-31: PASS150 TEST-31: PASS151 TEST-31: PASS152 TEST-31: PASS153 TEST-31: PASS154 TEST-32: PASS155 137 TEST-32: PASS 156 138 TEST-32: PASS … … 158 140 TEST-33: PASS 159 141 TEST-33: PASS 160 TEST-33: PASS 161 TEST-33: PASS 162 TEST-33: PASS 163 TEST-33: PASS 164 TEST-33: PASS 165 TEST-33: PASS 142 TEST-34: PASS 143 TEST-34: PASS 144 TEST-34: PASS 145 TEST-34: PASS 146 TEST-34: PASS 147 TEST-34: PASS 148 TEST-34: PASS 149 TEST-34: PASS 150 TEST-34: PASS 151 TEST-34: PASS 152 TEST-34: PASS 153 TEST-34: PASS 154 TEST-34: PASS 155 TEST-34: PASS 156 TEST-34: PASS 157 TEST-34: PASS 158 TEST-35: PASS 159 TEST-35: PASS 160 TEST-35: PASS 161 TEST-35: PASS 162 TEST-35: PASS 163 TEST-35: PASS 164 TEST-35: PASS 165 TEST-35: PASS 166 TEST-35: PASS 167 TEST-35: PASS 168 TEST-36: PASS 169 TEST-36: PASS 170 TEST-36: PASS 171 TEST-36: PASS 172 TEST-37: PASS 173 TEST-37: PASS 174 TEST-37: PASS 175 TEST-37: PASS 176 TEST-37: PASS 177 TEST-37: PASS 178 TEST-37: PASS 179 TEST-37: PASS -
trunk/Tools/ChangeLog
r99811 r99818 1 2011-11-09 Hayato Ito <hayato@chromium.org> 2 3 [NRWT] Make results.html aware of reference filename in reftests. 4 https://bugs.webkit.org/show_bug.cgi?id=71574 5 6 Reviewed by Ryosuke Niwa. 7 8 If a reference filename is different from the default one, include that in result summary 9 so results.html can link to the correct reference file. 10 11 * Scripts/webkitpy/layout_tests/controllers/manager.py: 12 * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py: 13 1 14 2011-11-09 Kevin Ollivier <kevino@theolliviers.com> 2 15 -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
r99461 r99818 69 69 70 70 71 def interpret_test_failures(port, test_name, failures): 72 """Interpret test failures and returns a test result as dict. 73 74 Args: 75 port: interface to port-specific hooks 76 test_name: test name relative to layout_tests directory 77 failures: list of test failures 78 Returns: 79 A dictionary like {'is_reftest': True, ...} 80 """ 81 test_dict = {} 82 failure_types = [type(failure) for failure in failures] 83 # FIXME: get rid of all this is_* values once there is a 1:1 map between 84 # TestFailure type and test_expectations.EXPECTATION. 85 if test_failures.FailureMissingAudio in failure_types: 86 test_dict['is_missing_audio'] = True 87 88 for failure in failures: 89 if isinstance(failure, test_failures.FailureImageHashMismatch): 90 test_dict['image_diff_percent'] = failure.diff_percent 91 elif isinstance(failure, test_failures.FailureReftestMismatch): 92 test_dict['is_reftest'] = True 93 if failure.reference_filename != port.reftest_expected_filename(test_name): 94 test_dict['ref_file'] = port.relative_test_filename(failure.reference_filename) 95 elif isinstance(failure, test_failures.FailureReftestMismatchDidNotOccur): 96 test_dict['is_mismatch_reftest'] = True 97 if failure.reference_filename != port.reftest_expected_mismatch_filename(test_name): 98 test_dict['ref_file'] = port.relative_test_filename(failure.reference_filename) 99 100 if test_failures.FailureMissingResult in failure_types: 101 test_dict['is_missing_text'] = True 102 103 if test_failures.FailureMissingImage in failure_types or test_failures.FailureMissingImageHash in failure_types: 104 test_dict['is_missing_image'] = True 105 return test_dict 106 107 71 108 # FIXME: This should be on the Manager class (since that's the only caller) 72 109 # or split off from Manager onto another helper class, but should not be a free function. … … 161 198 # and only set it if there actually is stderr data. 162 199 163 failure_types = [type(f) for f in result.failures] 164 # FIXME: get rid of all this is_* values once there is a 1:1 map between 165 # TestFailure type and test_expectations.EXPECTATION. 166 if test_failures.FailureMissingAudio in failure_types: 167 test_dict['is_missing_audio'] = True 168 169 if test_failures.FailureReftestMismatch in failure_types: 170 test_dict['is_reftest'] = True 171 172 for f in result.failures: 173 if 'is_reftest' in result.failures: 174 test_dict['is_reftest'] = True 175 if type(f) is test_failures.FailureImageHashMismatch: 176 test_dict['image_diff_percent'] = f.diff_percent 177 178 if test_failures.FailureReftestMismatchDidNotOccur in failure_types: 179 test_dict['is_mismatch_reftest'] = True 180 181 if test_failures.FailureMissingResult in failure_types: 182 test_dict['is_missing_text'] = True 183 184 if test_failures.FailureMissingImage in failure_types or test_failures.FailureMissingImageHash in failure_types: 185 test_dict['is_missing_image'] = True 200 test_dict.update(interpret_test_failures(port_obj, test_name, result.failures)) 186 201 187 202 # Store test hierarchically by directory. e.g. -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
r99773 r99818 43 43 from webkitpy import layout_tests 44 44 from webkitpy.layout_tests import run_webkit_tests 45 from webkitpy.layout_tests.controllers.manager import Manager, natural_sort_key, test_key, TestRunInterruptedException, TestShard 45 from webkitpy.layout_tests.controllers.manager import interpret_test_failures, Manager, natural_sort_key, test_key, TestRunInterruptedException, TestShard 46 from webkitpy.layout_tests.models import test_failures 46 47 from webkitpy.layout_tests.models.result_summary import ResultSummary 47 48 from webkitpy.layout_tests.views import printing … … 305 306 306 307 308 class ResultSummaryTest(unittest.TestCase): 309 310 def setUp(self): 311 host = MockHost() 312 self.port = host.port_factory.get(port_name='test') 313 314 def test_interpret_test_failures(self): 315 test_dict = interpret_test_failures(self.port, 'foo/reftest.html', 316 [test_failures.FailureReftestMismatch(self.port.abspath_for_test('foo/reftest-expected.html'))]) 317 self.assertTrue('is_reftest' in test_dict) 318 self.assertFalse('is_mismatch_reftest' in test_dict) 319 self.assertFalse('ref_file' in test_dict) 320 321 test_dict = interpret_test_failures(self.port, 'foo/reftest.html', 322 [test_failures.FailureReftestMismatch(self.port.abspath_for_test('foo/common.html'))]) 323 self.assertTrue('is_reftest' in test_dict) 324 self.assertFalse('is_mismatch_reftest' in test_dict) 325 self.assertEqual(test_dict['ref_file'], 'foo/common.html') 326 327 test_dict = interpret_test_failures(self.port, 'foo/reftest.html', 328 [test_failures.FailureReftestMismatchDidNotOccur(self.port.abspath_for_test('foo/reftest-expected-mismatch.html'))]) 329 self.assertFalse('is_reftest' in test_dict) 330 self.assertTrue(test_dict['is_mismatch_reftest']) 331 self.assertFalse('ref_file' in test_dict) 332 333 test_dict = interpret_test_failures(self.port, 'foo/reftest.html', 334 [test_failures.FailureReftestMismatchDidNotOccur(self.port.abspath_for_test('foo/common.html'))]) 335 self.assertFalse('is_reftest' in test_dict) 336 self.assertTrue(test_dict['is_mismatch_reftest']) 337 self.assertEqual(test_dict['ref_file'], 'foo/common.html') 338 339 307 340 if __name__ == '__main__': 308 341 port_testcase.main()
Note:
See TracChangeset
for help on using the changeset viewer.