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

Unified Diff: build/android/pylib/monkey/test_runner.py

Issue 221823011: [Android] Change object types from AndroidCommands to DeviceUtils in build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/linker/test_case.py ('k') | build/android/pylib/perf/cache_control.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/monkey/test_runner.py
diff --git a/build/android/pylib/monkey/test_runner.py b/build/android/pylib/monkey/test_runner.py
index 76eb623bb4cc9fc52bcad6ed94495babdd8f9d21..31d885187ba0c8421b7ec964407f1306a61c5bef 100644
--- a/build/android/pylib/monkey/test_runner.py
+++ b/build/android/pylib/monkey/test_runner.py
@@ -40,7 +40,8 @@ class TestRunner(base_test_runner.BaseTestRunner):
'--kill-process-after-error',
self._options.extra_args,
'%d' % self._options.event_count]
- return self.adb.RunShellCommand(' '.join(cmd), timeout_time=timeout_ms)
+ return self.device.old_interface.RunShellCommand(
+ ' '.join(cmd), timeout_time=timeout_ms)
def RunTest(self, test_name):
"""Run a Monkey test on the device.
@@ -51,21 +52,19 @@ class TestRunner(base_test_runner.BaseTestRunner):
Returns:
A tuple of (TestRunResults, retry).
"""
- self.adb.StartActivity(self._package,
- self._activity,
- wait_for_completion=True,
- action='android.intent.action.MAIN',
- force_stop=True)
+ self.device.old_interface.StartActivity(
+ self._package, self._activity, wait_for_completion=True,
+ action='android.intent.action.MAIN', force_stop=True)
# Chrome crashes are not always caught by Monkey test runner.
# Verify Chrome has the same PID before and after the test.
- before_pids = self.adb.ExtractPid(self._package)
+ before_pids = self.device.old_interface.ExtractPid(self._package)
# Run the test.
output = ''
if before_pids:
output = '\n'.join(self._LaunchMonkeyTest())
- after_pids = self.adb.ExtractPid(self._package)
+ after_pids = self.device.old_interface.ExtractPid(self._package)
crashed = True
if not before_pids:
@@ -89,7 +88,7 @@ class TestRunner(base_test_runner.BaseTestRunner):
if 'chrome' in self._options.package:
logging.warning('Starting MinidumpUploadService...')
try:
- self.adb.StartCrashUploadService(self._package)
+ self.device.old_interface.StartCrashUploadService(self._package)
except AssertionError as e:
logging.error('Failed to start MinidumpUploadService: %s', e)
results.AddResult(result)
« no previous file with comments | « build/android/pylib/linker/test_case.py ('k') | build/android/pylib/perf/cache_control.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698