|
Lines 166-172
def get_tests_run(extra_args=None, tests
Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py_sec1
|
| 166 |
# In case of reftest, one test calls the driver's run_test() twice. |
166 |
# In case of reftest, one test calls the driver's run_test() twice. |
| 167 |
# We should not add a reference html used by reftests to tests unless include_reference_html parameter |
167 |
# We should not add a reference html used by reftests to tests unless include_reference_html parameter |
| 168 |
# is explicitly given. |
168 |
# is explicitly given. |
| 169 |
if include_reference_html or not is_reference_html_file(test_input.test_name): |
169 |
filesystem = self._port.host.filesystem |
|
|
170 |
dirname, filename = filesystem.split(test_name) |
| 171 |
if include_reference_html or not is_reference_html_file(filesystem, dirname, filename): |
| 170 |
self._current_test_batch.append(test_name) |
172 |
self._current_test_batch.append(test_name) |
| 171 |
return TestDriver.run_test(self, test_input) |
173 |
return TestDriver.run_test(self, test_input) |
| 172 |
|
174 |
|
|
Lines 426-432
class MainTest(unittest.TestCase):
Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py_sec2
|
| 426 |
|
428 |
|
| 427 |
# Update this magic number if you add an unexpected test to webkitpy.layout_tests.port.test |
429 |
# Update this magic number if you add an unexpected test to webkitpy.layout_tests.port.test |
| 428 |
# FIXME: It's nice to have a routine in port/test.py that returns this number. |
430 |
# FIXME: It's nice to have a routine in port/test.py that returns this number. |
| 429 |
unexpected_tests_count = 7 |
431 |
unexpected_tests_count = 8 |
| 430 |
|
432 |
|
| 431 |
self.assertEqual(res, unexpected_tests_count) |
433 |
self.assertEqual(res, unexpected_tests_count) |
| 432 |
self.assertFalse(out.empty()) |
434 |
self.assertFalse(out.empty()) |
|
Lines 448-455
class MainTest(unittest.TestCase):
Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py_sec3
|
| 448 |
expected_token = '"unexpected":{"text-image-checksum.html":{"expected":"PASS","actual":"TEXT"},"missing_text.html":{"expected":"PASS","is_missing_text":true,"actual":"MISSING"}' |
450 |
expected_token = '"unexpected":{"text-image-checksum.html":{"expected":"PASS","actual":"TEXT"},"missing_text.html":{"expected":"PASS","is_missing_text":true,"actual":"MISSING"}' |
| 449 |
json_string = fs.read_text_file('/tmp/layout-test-results/full_results.json') |
451 |
json_string = fs.read_text_file('/tmp/layout-test-results/full_results.json') |
| 450 |
self.assertTrue(json_string.find(expected_token) != -1) |
452 |
self.assertTrue(json_string.find(expected_token) != -1) |
| 451 |
self.assertTrue(json_string.find('"num_regression":1') == -1) |
453 |
self.assertTrue(json_string.find('"num_regressions":1') != -1) |
| 452 |
self.assertTrue(json_string.find('"num_flaky":1') == -1) |
454 |
self.assertTrue(json_string.find('"num_flaky":0') != -1) |
|
|
455 |
self.assertTrue(json_string.find('"num_missing":1') != -1) |
| 456 |
|
| 457 |
def test_missing_and_unexpected_results(self): |
| 458 |
# Test that we update expectations in place. If the expectation |
| 459 |
# is missing, update the expected generic location. |
| 460 |
fs = unit_test_filesystem() |
| 461 |
res, out, err, _ = logging_run(['--no-show-results', 'reftests/foo/'], tests_included=True, filesystem=fs, record_results=True) |
| 462 |
file_list = fs.written_files.keys() |
| 463 |
file_list.remove('/tmp/layout-test-results/tests_run0.txt') |
| 464 |
self.assertEquals(res, 1) |
| 465 |
json_string = fs.read_text_file('/tmp/layout-test-results/full_results.json') |
| 466 |
self.assertTrue(json_string.find('"unlistedtest.html":{"expected":"PASS","is_missing_text":true,"actual":"MISSING","is_missing_image":true}') != -1) |
| 467 |
self.assertTrue(json_string.find('"num_regressions":1') != -1) |
| 468 |
self.assertTrue(json_string.find('"num_flaky":0') != -1) |
| 453 |
self.assertTrue(json_string.find('"num_missing":1') != -1) |
469 |
self.assertTrue(json_string.find('"num_missing":1') != -1) |
| 454 |
|
470 |
|
| 455 |
def test_missing_and_unexpected_results_with_custom_exit_code(self): |
471 |
def test_missing_and_unexpected_results_with_custom_exit_code(self): |
|
Lines 757-764
class EndToEndTest(unittest.TestCase):
Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py_sec4
|
| 757 |
fs = unit_test_filesystem() |
773 |
fs = unit_test_filesystem() |
| 758 |
res, out, err, user = logging_run(record_results=True, tests_included=True, filesystem=fs) |
774 |
res, out, err, user = logging_run(record_results=True, tests_included=True, filesystem=fs) |
| 759 |
|
775 |
|
| 760 |
# Seven tests should fail, so the return code should be 7. |
776 |
self.assertEquals(res, unexpected_tests_count) |
| 761 |
self.assertEquals(res, 7) |
|
|
| 762 |
results = self.parse_full_results(fs.files['/tmp/layout-test-results/full_results.json']) |
777 |
results = self.parse_full_results(fs.files['/tmp/layout-test-results/full_results.json']) |
| 763 |
|
778 |
|
| 764 |
# Check to ensure we're passing back image diff %age correctly. |
779 |
# Check to ensure we're passing back image diff %age correctly. |