| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """ | 5 """ |
| 6 Recipe for running WebView CTS using system WebView. | 6 Recipe for running WebView CTS using system WebView. |
| 7 """ | 7 """ |
| 8 DEPS = [ | 8 DEPS = [ |
| 9 'adb', | 9 'adb', |
| 10 'bot_update', | 10 'bot_update', |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 test_method.get('name') not in EXPECTED_FAILURE.get(class_name, [])): | 118 test_method.get('name') not in EXPECTED_FAILURE.get(class_name, [])): |
| 119 unexpected_test_failures.append(method_name) | 119 unexpected_test_failures.append(method_name) |
| 120 | 120 |
| 121 if unexpected_test_failures or not_executed_tests: | 121 if unexpected_test_failures or not_executed_tests: |
| 122 api.step.active_result.presentation.status = api.step.FAILURE | 122 api.step.active_result.presentation.status = api.step.FAILURE |
| 123 api.step.active_result.presentation.step_text += ( | 123 api.step.active_result.presentation.step_text += ( |
| 124 api.test_utils.format_step_text( | 124 api.test_utils.format_step_text( |
| 125 [['unexpected failures:', unexpected_test_failures], | 125 [['unexpected failures:', unexpected_test_failures], |
| 126 ['not executed:', not_executed_tests]])) | 126 ['not executed:', not_executed_tests]])) |
| 127 | 127 |
| 128 api.chromium_android.logcat_dump() | 128 logcat_file = api.chromium.output_dir.join('full_logcat') |
| 129 api.chromium_android.stack_tool_steps() | 129 api.chromium_android.logcat_dump(output_logcat_file=logcat_file) |
| 130 api.chromium_android.stack_tool_steps(logcat_file=logcat_file) |
| 130 api.chromium_android.test_report() | 131 api.chromium_android.test_report() |
| 131 | 132 |
| 132 if unexpected_test_failures: | 133 if unexpected_test_failures: |
| 133 raise api.step.StepFailure("Unexpected Test Failures.") | 134 raise api.step.StepFailure("Unexpected Test Failures.") |
| 134 if not_executed_tests: | 135 if not_executed_tests: |
| 135 raise api.step.StepFailure("Tests not executed.") | 136 raise api.step.StepFailure("Tests not executed.") |
| 136 | 137 |
| 137 def GenTests(api): | 138 def GenTests(api): |
| 138 result_xml_with_unexecuted_tests = """<TestResult> | 139 result_xml_with_unexecuted_tests = """<TestResult> |
| 139 <TestPackage> | 140 <TestPackage> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 api.override_step_data('Read test result and report failures', | 229 api.override_step_data('Read test result and report failures', |
| 229 api.raw_io.output(result_xml_with_unexpected_failure_method)) + \ | 230 api.raw_io.output(result_xml_with_unexpected_failure_method)) + \ |
| 230 api.properties.generic(mastername='chromium.android') | 231 api.properties.generic(mastername='chromium.android') |
| 231 | 232 |
| 232 yield api.test('Test_parsing_invalid_cts_output') + \ | 233 yield api.test('Test_parsing_invalid_cts_output') + \ |
| 233 api.override_step_data('Run Cts', api.raw_io.stream_output( | 234 api.override_step_data('Run Cts', api.raw_io.stream_output( |
| 234 'Invalid CTS output here...', | 235 'Invalid CTS output here...', |
| 235 stream='stdout')) + \ | 236 stream='stdout')) + \ |
| 236 api.properties.generic(mastername='chromium.android') + \ | 237 api.properties.generic(mastername='chromium.android') + \ |
| 237 api.expect_exception('Exception') | 238 api.expect_exception('Exception') |
| OLD | NEW |