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

Unified Diff: build/android/run_monkey_test.py

Issue 11273099: Restart app before running monkey test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed bulach's comments Created 8 years, 2 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/apk_info.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « build/android/pylib/apk_info.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698