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

Unified Diff: build/android/run_monkey_test.py

Issue 12567018: [Android] Fix monkey tests after base test result rewrite. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « no previous file | 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 cb15694ee474b9ab3ec5ef04add916c47da5120d..3ec952dcdb39872d093513a5710b50d9676d9d67 100755
--- a/build/android/run_monkey_test.py
+++ b/build/android/run_monkey_test.py
@@ -91,15 +91,19 @@ def DispatchPythonTests(options):
"""Dispatches the Monkey tests, sharding it if there multiple devices."""
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
-
- available_tests = [MonkeyTest('testMonkey')]
attached_devices = android_commands.GetAttachedDevices()
if not attached_devices:
raise Exception('You have no devices attached or visible!')
# Actually run the tests.
logging.debug('Running monkey tests.')
- available_tests *= len(attached_devices)
+ # TODO(frankf): This is a stop-gap solution. Come up with a
+ # general way for running tests on every devices.
+ available_tests = []
+ for k in range(len(attached_devices)):
+ new_method = 'testMonkey%d' % k
+ setattr(MonkeyTest, new_method, MonkeyTest.testMonkey)
+ available_tests.append(MonkeyTest(new_method))
options.ensure_value('shard_retries', 1)
sharder = python_test_sharder.PythonTestSharder(
attached_devices, available_tests, options)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698