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

Unified Diff: build/android/run_monkey_test.py

Issue 10917283: Upstream changes to python tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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/run_instrumentation_tests.py ('k') | build/android/run_tests.py » ('j') | 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 7103cb5800275b6f703ef7d37de77f174dda13ce..16211b4bae7fba4367a56cde3b890fd1ef2b42d2 100755
--- a/build/android/run_monkey_test.py
+++ b/build/android/run_monkey_test.py
@@ -7,6 +7,7 @@
import logging
import optparse
import random
+import sys
import time
from pylib import android_commands
@@ -17,10 +18,6 @@ from pylib import test_result
class MonkeyTest(python_test_base.PythonTestBase):
- def __init__(self, test_name, options):
- self.options = options
- super(MonkeyTest, self).__init__(test_name)
-
def testMonkey(self):
start_ms = int(time.time()) * 1000
@@ -107,8 +104,9 @@ def DispatchPythonTests(options):
# Actually run the tests.
logging.debug('Running monkey tests.')
available_tests *= len(attached_devices)
+ options.ensure_value('shard_retries',1)
sharder = python_test_sharder.PythonTestSharder(
- attached_devices, 1, available_tests)
+ attached_devices, available_tests, options)
result = sharder.RunShardedTests()
result.LogFull('Monkey', 'Monkey', options.build_type)
result.PrintAnnotation()
@@ -139,9 +137,11 @@ def main():
(options, args) = parser.parse_args()
if args:
+ parser.print_help(sys.stderr)
parser.error('Unknown arguments: %s' % args)
if not options.package_name:
+ parser.print_help(sys.stderr)
parser.error('Missing package name')
if options.category:
« no previous file with comments | « build/android/run_instrumentation_tests.py ('k') | build/android/run_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698