| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 test_method.get('name') not in EXPECTED_FAILURE.get(class_name, [])): | 124 test_method.get('name') not in EXPECTED_FAILURE.get(class_name, [])): |
| 125 unexpected_test_failures.append(method_name) | 125 unexpected_test_failures.append(method_name) |
| 126 | 126 |
| 127 if unexpected_test_failures or not_executed_tests: | 127 if unexpected_test_failures or not_executed_tests: |
| 128 api.step.active_result.presentation.status = api.step.FAILURE | 128 api.step.active_result.presentation.status = api.step.FAILURE |
| 129 api.step.active_result.presentation.step_text += ( | 129 api.step.active_result.presentation.step_text += ( |
| 130 api.test_utils.format_step_text( | 130 api.test_utils.format_step_text( |
| 131 [['unexpected failures:', unexpected_test_failures], | 131 [['unexpected failures:', unexpected_test_failures], |
| 132 ['not executed:', not_executed_tests]])) | 132 ['not executed:', not_executed_tests]])) |
| 133 | 133 |
| 134 logcat_file = api.chromium.output_dir.join('full_logcat') | 134 api.chromium_android.logcat_dump() |
| 135 api.chromium_android.logcat_dump(output_logcat_file=logcat_file) | 135 api.chromium_android.stack_tool_steps() |
| 136 api.chromium_android.stack_tool_steps(logcat_file=logcat_file) | |
| 137 api.chromium_android.test_report() | 136 api.chromium_android.test_report() |
| 138 | 137 |
| 139 if unexpected_test_failures: | 138 if unexpected_test_failures: |
| 140 raise api.step.StepFailure("Unexpected Test Failures.") | 139 raise api.step.StepFailure("Unexpected Test Failures.") |
| 141 if not_executed_tests: | 140 if not_executed_tests: |
| 142 raise api.step.StepFailure("Tests not executed.") | 141 raise api.step.StepFailure("Tests not executed.") |
| 143 | 142 |
| 144 def GenTests(api): | 143 def GenTests(api): |
| 145 result_xml_with_unexecuted_tests = """<TestResult> | 144 result_xml_with_unexecuted_tests = """<TestResult> |
| 146 <TestPackage> | 145 <TestPackage> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 api.override_step_data('Read test result and report failures', | 234 api.override_step_data('Read test result and report failures', |
| 236 api.raw_io.output(result_xml_with_unexpected_failure_method)) + \ | 235 api.raw_io.output(result_xml_with_unexpected_failure_method)) + \ |
| 237 api.properties.generic(mastername='chromium.android') | 236 api.properties.generic(mastername='chromium.android') |
| 238 | 237 |
| 239 yield api.test('Test_parsing_invalid_cts_output') + \ | 238 yield api.test('Test_parsing_invalid_cts_output') + \ |
| 240 api.override_step_data('Run Cts', api.raw_io.stream_output( | 239 api.override_step_data('Run Cts', api.raw_io.stream_output( |
| 241 'Invalid CTS output here...', | 240 'Invalid CTS output here...', |
| 242 stream='stdout')) + \ | 241 stream='stdout')) + \ |
| 243 api.properties.generic(mastername='chromium.android') + \ | 242 api.properties.generic(mastername='chromium.android') + \ |
| 244 api.expect_exception('Exception') | 243 api.expect_exception('Exception') |
| OLD | NEW |