Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: scripts/slave/recipes/android_webview_cts_tests.py

Issue 1511403002: Revert "[Android] Add context manager to record logcat during step(s)." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698