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

Side by Side Diff: scripts/slave/recipes/android_webview_shell_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 SystemWebViewShell instrumentation layout tests using 6 Recipe for running SystemWebViewShell instrumentation layout tests using
7 system WebView. 7 system WebView.
8 """ 8 """
9 9
10 from recipe_engine.types import freeze 10 from recipe_engine.types import freeze
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 # Install system WebView shell 81 # Install system WebView shell
82 api.chromium_android.adb_install_apk(WEBVIEW_SHELL_APK) 82 api.chromium_android.adb_install_apk(WEBVIEW_SHELL_APK)
83 83
84 api.adb.list_devices() 84 api.adb.list_devices()
85 85
86 # Run the instrumentation tests from the package. 86 # Run the instrumentation tests from the package.
87 with api.step.defer_results(): 87 with api.step.defer_results():
88 for suite in INSTRUMENTATION_TESTS: 88 for suite in INSTRUMENTATION_TESTS:
89 run_instrumentation_test(api, suite) 89 run_instrumentation_test(api, suite)
90 90
91 logcat_file = api.chromium.output_dir.join('full_logcat') 91 api.chromium_android.logcat_dump()
92 api.chromium_android.logcat_dump(output_logcat_file=logcat_file) 92 api.chromium_android.stack_tool_steps()
93 api.chromium_android.stack_tool_steps(logcat_file=logcat_file)
94 api.chromium_android.test_report() 93 api.chromium_android.test_report()
95 94
96 def run_instrumentation_test(api, suite): 95 def run_instrumentation_test(api, suite):
97 mock_test_results = { 96 mock_test_results = {
98 'per_iteration_data': [{'TestA': [{'status': 'SUCCESS'}]}, 97 'per_iteration_data': [{'TestA': [{'status': 'SUCCESS'}]},
99 {'TestB': [{'status': 'FAILURE'}]}] 98 {'TestB': [{'status': 'FAILURE'}]}]
100 } 99 }
101 try: 100 try:
102 json_results_file = api.json.output(add_json_log=False) 101 json_results_file = api.json.output(add_json_log=False)
103 api.chromium_android.run_instrumentation_suite( 102 api.chromium_android.run_instrumentation_suite(
(...skipping 20 matching lines...) Expand all
124 123
125 def GenTests(api): 124 def GenTests(api):
126 yield (api.test('basic') + 125 yield (api.test('basic') +
127 api.properties.scheduled()) 126 api.properties.scheduled())
128 127
129 yield ( 128 yield (
130 api.test('test_failure') + 129 api.test('test_failure') +
131 api.properties.scheduled() + 130 api.properties.scheduled() +
132 api.step_data( 131 api.step_data(
133 'Instrumentation test SystemWebViewShellLayoutTest', retcode=1)) 132 'Instrumentation test SystemWebViewShellLayoutTest', retcode=1))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698