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

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

Issue 1465343002: [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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 api.chromium_android.adb_install_apk(WEBVIEW_APK) 78 api.chromium_android.adb_install_apk(WEBVIEW_APK)
79 79
80 # Install system WebView shell 80 # Install system WebView shell
81 api.chromium_android.adb_install_apk(WEBVIEW_SHELL_APK) 81 api.chromium_android.adb_install_apk(WEBVIEW_SHELL_APK)
82 82
83 api.adb.list_devices() 83 api.adb.list_devices()
84 84
85 # Run the instrumentation tests from the package. 85 # Run the instrumentation tests from the package.
86 run_tests(api) 86 run_tests(api)
87 87
88 api.chromium_android.logcat_dump() 88 logcat_file = api.chromium.output_dir.join('full_logcat')
89 api.chromium_android.stack_tool_steps() 89 api.chromium_android.logcat_dump(output_logcat_file=logcat_file)
90 api.chromium_android.stack_tool_steps(logcat_file=logcat_file)
90 api.chromium_android.test_report() 91 api.chromium_android.test_report()
91 92
92 def run_tests(api): 93 def run_tests(api):
93 droid = api.chromium_android 94 droid = api.chromium_android
94 for suite in INSTRUMENTATION_TESTS: 95 for suite in INSTRUMENTATION_TESTS:
95 droid.run_instrumentation_suite( 96 droid.run_instrumentation_suite(
96 suite['test'], test_apk=droid.apk_path(suite['test_apk']), 97 suite['test'], test_apk=droid.apk_path(suite['test_apk']),
97 verbose=True, 98 verbose=True,
98 **suite.get('kwargs', {})) 99 **suite.get('kwargs', {}))
99 100
100 def GenTests(api): 101 def GenTests(api):
101 yield api.test('basic') + api.properties.scheduled() 102 yield api.test('basic') + api.properties.scheduled()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698