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

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

Issue 23383002: Fix android UI Automator python script because of new param added. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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.instrumentation import test_options as instr_test_options 7 from pylib.instrumentation import test_options as instr_test_options
8 from pylib.instrumentation import test_runner as instr_test_runner 8 from pylib.instrumentation import test_runner as instr_test_runner
9 9
10 10
(...skipping 17 matching lines...) Expand all
28 test_options.tool, 28 test_options.tool,
29 test_options.cleanup_test_files, 29 test_options.cleanup_test_files,
30 test_options.push_deps, 30 test_options.push_deps,
31 test_options.annotations, 31 test_options.annotations,
32 test_options.exclude_annotations, 32 test_options.exclude_annotations,
33 test_options.test_filter, 33 test_options.test_filter,
34 test_options.test_data, 34 test_options.test_data,
35 test_options.save_perf_json, 35 test_options.save_perf_json,
36 test_options.screenshot_failures, 36 test_options.screenshot_failures,
37 wait_for_debugger=False, 37 wait_for_debugger=False,
38 coverage_dir=None,
38 test_apk=None, 39 test_apk=None,
39 test_apk_path=None, 40 test_apk_path=None,
40 test_apk_jar_path=None) 41 test_apk_jar_path=None)
41 super(TestRunner, self).__init__(instrumentation_options, device, 42 super(TestRunner, self).__init__(instrumentation_options, device,
42 shard_index, test_pkg, ports_to_forward) 43 shard_index, test_pkg, ports_to_forward)
43 44
44 self.package_name = test_options.package_name 45 self.package_name = test_options.package_name
45 46
46 #override 47 #override
47 def InstallTestPackage(self): 48 def InstallTestPackage(self):
48 self.test_pkg.Install(self.adb) 49 self.test_pkg.Install(self.adb)
49 50
50 #override 51 #override
51 def PushDataDeps(self): 52 def PushDataDeps(self):
52 pass 53 pass
53 54
54 #override 55 #override
55 def _RunTest(self, test, timeout): 56 def _RunTest(self, test, timeout):
56 self.adb.ClearApplicationState(self.package_name) 57 self.adb.ClearApplicationState(self.package_name)
57 if 'Feature:FirstRunExperience' in self.test_pkg.GetTestAnnotations(test): 58 if 'Feature:FirstRunExperience' in self.test_pkg.GetTestAnnotations(test):
58 self.flags.RemoveFlags(['--disable-fre']) 59 self.flags.RemoveFlags(['--disable-fre'])
59 else: 60 else:
60 self.flags.AddFlags(['--disable-fre']) 61 self.flags.AddFlags(['--disable-fre'])
61 return self.adb.RunUIAutomatorTest( 62 return self.adb.RunUIAutomatorTest(
62 test, self.test_pkg.GetPackageName(), timeout) 63 test, self.test_pkg.GetPackageName(), timeout)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698