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

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

Issue 1314313004: [Android][telemetry] Update pylib imports for modules that moved into devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 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 """Runs a monkey test on a single device.""" 5 """Runs a monkey test on a single device."""
6 6
7 import logging 7 import logging
8 import random 8 import random
9 9
10 from devil.android import device_errors
11 from devil.android.sdk import intent
10 from pylib import constants 12 from pylib import constants
11 from pylib.base import base_test_result 13 from pylib.base import base_test_result
12 from pylib.base import base_test_runner 14 from pylib.base import base_test_runner
13 from pylib.device import device_errors
14 from pylib.device import intent
15 15
16 _CHROME_PACKAGE = constants.PACKAGE_INFO['chrome'].package 16 _CHROME_PACKAGE = constants.PACKAGE_INFO['chrome'].package
17 17
18 class TestRunner(base_test_runner.BaseTestRunner): 18 class TestRunner(base_test_runner.BaseTestRunner):
19 """A TestRunner instance runs a monkey test on a single device.""" 19 """A TestRunner instance runs a monkey test on a single device."""
20 20
21 def __init__(self, test_options, device, _): 21 def __init__(self, test_options, device, _):
22 super(TestRunner, self).__init__(device, None) 22 super(TestRunner, self).__init__(device, None)
23 self._options = test_options 23 self._options = test_options
24 self._package = constants.PACKAGE_INFO[self._options.package].package 24 self._package = constants.PACKAGE_INFO[self._options.package].package
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 activity='%s.crash.MinidumpUploadService' % _CHROME_PACKAGE) 101 activity='%s.crash.MinidumpUploadService' % _CHROME_PACKAGE)
102 try: 102 try:
103 self.device.RunShellCommand( 103 self.device.RunShellCommand(
104 ['am', 'startservice'] + minidump_intent.am_args, 104 ['am', 'startservice'] + minidump_intent.am_args,
105 as_root=True, check_return=True) 105 as_root=True, check_return=True)
106 except device_errors.CommandFailedError: 106 except device_errors.CommandFailedError:
107 logging.exception('Failed to start MinidumpUploadService') 107 logging.exception('Failed to start MinidumpUploadService')
108 108
109 results.AddResult(result) 109 results.AddResult(result)
110 return results, False 110 return results, False
OLDNEW
« no previous file with comments | « build/android/pylib/local/device/local_device_test_run.py ('k') | build/android/pylib/perf/cache_control.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698