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

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

Issue 386053002: [Android] Switch to DeviceUtils versions of GetPid, TakeScreenshot, and GetIoStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | build/android/pylib/screenshot.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 42b7d41f116df21b353e416cf80fdfcbd7d5f04f..19dd339480d35c9ec910fc412794412107d73b2b 100644
--- a/build/android/pylib/monkey/test_runner.py
+++ b/build/android/pylib/monkey/test_runner.py
@@ -58,22 +58,22 @@ class TestRunner(base_test_runner.BaseTestRunner):
# Chrome crashes are not always caught by Monkey test runner.
# Verify Chrome has the same PID before and after the test.
- before_pids = self.device.old_interface.ExtractPid(self._package)
+ before_pids = self.device.GetPids(self._package)
# Run the test.
output = ''
if before_pids:
output = '\n'.join(self._LaunchMonkeyTest())
- after_pids = self.device.old_interface.ExtractPid(self._package)
+ after_pids = self.device.GetPids(self._package)
crashed = True
- if not before_pids:
+ if not self._package in before_pids:
logging.error('Failed to start the process.')
- elif not after_pids:
- logging.error('Process %s has died.', before_pids[0])
- elif before_pids[0] != after_pids[0]:
+ elif not self._package in after_pids:
+ logging.error('Process %s has died.', before_pids[self._package])
+ elif before_pids[self._package] != after_pids[self._package]:
logging.error('Detected process restart %s -> %s',
- before_pids[0], after_pids[0])
+ before_pids[self._package], after_pids[self._package])
else:
crashed = False
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | build/android/pylib/screenshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698