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

Side by Side Diff: build/android/pylib/uiautomator/test_runner.py

Issue 1222313015: Manual partial update from from https://crrev.com/337502 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months 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
« no previous file with comments | « build/android/pylib/sdk/split_select.py ('k') | build/android/pylib/utils/emulator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 """Class for running uiautomator tests on a single device.""" 5 """Class for running uiautomator tests on a single device."""
6 6
7 from pylib import constants 7 from pylib import constants
8 from pylib import flag_changer 8 from pylib import flag_changer
9 from pylib.device import intent 9 from pylib.device import intent
10 from pylib.instrumentation import test_options as instr_test_options 10 from pylib.instrumentation import test_options as instr_test_options
(...skipping 23 matching lines...) Expand all
34 test_options.screenshot_failures, 34 test_options.screenshot_failures,
35 wait_for_debugger=False, 35 wait_for_debugger=False,
36 coverage_dir=None, 36 coverage_dir=None,
37 test_apk=None, 37 test_apk=None,
38 test_apk_path=None, 38 test_apk_path=None,
39 test_apk_jar_path=None, 39 test_apk_jar_path=None,
40 test_runner=None, 40 test_runner=None,
41 test_support_apk_path=None, 41 test_support_apk_path=None,
42 device_flags=None, 42 device_flags=None,
43 isolate_file_path=None, 43 isolate_file_path=None,
44 set_asserts=test_options.set_asserts) 44 set_asserts=test_options.set_asserts,
45 delete_stale_data=False)
45 super(TestRunner, self).__init__(instrumentation_options, device, 46 super(TestRunner, self).__init__(instrumentation_options, device,
46 shard_index, test_pkg) 47 shard_index, test_pkg)
47 48
48 cmdline_file = constants.PACKAGE_INFO[test_options.package].cmdline_file 49 cmdline_file = constants.PACKAGE_INFO[test_options.package].cmdline_file
49 self.flags = None 50 self.flags = None
50 if cmdline_file: 51 if cmdline_file:
51 self.flags = flag_changer.FlagChanger(self.device, cmdline_file) 52 self.flags = flag_changer.FlagChanger(self.device, cmdline_file)
52 self._package = constants.PACKAGE_INFO[test_options.package].package 53 self._package = constants.PACKAGE_INFO[test_options.package].package
53 self._activity = constants.PACKAGE_INFO[test_options.package].activity 54 self._activity = constants.PACKAGE_INFO[test_options.package].activity
54 55
(...skipping 24 matching lines...) Expand all
79 80
80 #override 81 #override
81 def _GenerateTestResult(self, test, _result_code, _result_bundle, statuses, 82 def _GenerateTestResult(self, test, _result_code, _result_bundle, statuses,
82 start_ms, duration_ms): 83 start_ms, duration_ms):
83 # uiautomator emits its summary status with INSTRUMENTATION_STATUS_CODE, 84 # uiautomator emits its summary status with INSTRUMENTATION_STATUS_CODE,
84 # not INSTRUMENTATION_CODE, so we have to drop if off the list of statuses. 85 # not INSTRUMENTATION_CODE, so we have to drop if off the list of statuses.
85 summary_code, summary_bundle = statuses[-1] 86 summary_code, summary_bundle = statuses[-1]
86 return super(TestRunner, self)._GenerateTestResult( 87 return super(TestRunner, self)._GenerateTestResult(
87 test, summary_code, summary_bundle, statuses[:-1], start_ms, 88 test, summary_code, summary_bundle, statuses[:-1], start_ms,
88 duration_ms) 89 duration_ms)
OLDNEW
« no previous file with comments | « build/android/pylib/sdk/split_select.py ('k') | build/android/pylib/utils/emulator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698