Index: build/android/run_monkey_test.py |
diff --git a/build/android/run_monkey_test.py b/build/android/run_monkey_test.py |
index 8abe975b018a3c09396b360dd5640dc1f3fc677c..894de4fc888bdfca41f97d4c0d1a6d69e9544f8d 100755 |
--- a/build/android/run_monkey_test.py |
+++ b/build/android/run_monkey_test.py |
@@ -25,7 +25,8 @@ class MonkeyTest(python_test_base.PythonTestBase): |
self.adb.StartActivity(self.options.package_name, |
self.options.activity_name, |
wait_for_completion=True, |
- action='android.intent.action.MAIN') |
+ 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. |
@@ -90,7 +91,6 @@ class MonkeyTest(python_test_base.PythonTestBase): |
return self.adb.RunShellCommand(' '.join(cmd), timeout_time=timeout_ms) |
- |
def DispatchPythonTests(options): |
"""Dispatches the Monkey tests, sharding it if there multiple devices.""" |
logger = logging.getLogger() |
@@ -104,13 +104,14 @@ def DispatchPythonTests(options): |
# Actually run the tests. |
logging.debug('Running monkey tests.') |
available_tests *= len(attached_devices) |
- options.ensure_value('shard_retries',1) |
+ options.ensure_value('shard_retries', 1) |
sharder = python_test_sharder.PythonTestSharder( |
attached_devices, available_tests, options) |
result = sharder.RunShardedTests() |
result.LogFull('Monkey', 'Monkey', options.build_type) |
result.PrintAnnotation() |
+ |
def main(): |
desc = 'Run the Monkey tests on 1 or more devices.' |
parser = optparse.OptionParser(description=desc) |