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

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

Issue 59813007: [Android] Enable starting the crash upload service using an intent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better logging for monkey Created 7 years, 1 month 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/android_commands.py ('k') | no next file » | 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 b0880391f1042cec6df74e9d56c22a75795a50f4..1920464547fa4882869db0bfb03a053d76506133 100644
--- a/build/android/pylib/monkey/test_runner.py
+++ b/build/android/pylib/monkey/test_runner.py
@@ -4,6 +4,7 @@
"""Runs a monkey test on a single device."""
+import logging
import random
from pylib import constants
@@ -66,8 +67,16 @@ class TestRunner(base_test_runner.BaseTestRunner):
output = '\n'.join(self._LaunchMonkeyTest())
after_pids = self.adb.ExtractPid(self._package)
- crashed = (not before_pids or not after_pids
- or after_pids[0] != before_pids[0])
+ crashed = True
+ if not 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]:
+ logging.error('Detected process restart %s -> %s',
+ before_pids[0], after_pids[0])
+ else:
+ crashed = False
results = base_test_result.TestRunResults()
success_pattern = 'Events injected: %d' % self._options.event_count
@@ -77,5 +86,8 @@ class TestRunner(base_test_runner.BaseTestRunner):
else:
result = base_test_result.BaseTestResult(
test_name, base_test_result.ResultType.FAIL, log=output)
+ if 'chrome' in self._options.package:
+ logging.warning('Start MinidumpUploadService...')
+ self.adb.StartCrashUploadService(self._package)
results.AddResult(result)
return results, False
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698