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

Unified Diff: build/android/pylib/android_commands.py

Issue 10908188: Moved RunMonkeyTests out of android_commands.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | « no previous file | build/android/run_monkey_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 2b412f31be3279a2833f851606ad77fcb30f2856..740f53c40f208226b5637b1479636726cceaf6dc 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -11,7 +11,6 @@ import collections
import datetime
import logging
import os
-import random
import re
import shlex
import subprocess
@@ -1003,37 +1002,3 @@ class AndroidCommands(object):
status = self._adb.SendShellCommand(
'\'ls "%s" >/dev/null 2>&1; echo $?\'' % (file_name))
return int(status) == 0
-
- def RunMonkey(self, package_name, category=None, throttle=100, seed=None,
- event_count=10000, verbosity=1, extra_args=''):
- """Runs monkey test for a given package.
-
- Args:
- package_name: Allowed package.
- category: A list of allowed categories.
- throttle: Delay between events (ms).
- seed: Seed value for pseduo-random generator. Same seed value
- generates the same sequence of events. Seed is randomized by
- default.
- event_count: Number of events to generate.
- verbosity: Verbosity level [0-3].
- extra_args: A string of other args to pass to the command verbatim.
-
- Returns:
- Output of the test run.
- """
- category = category or []
- seed = seed or random.randint(1, 100)
-
- cmd = ['monkey',
- '-p %s' % package_name,
- ' '.join(['-c %s' % c for c in category]),
- '--throttle %d' % throttle,
- '-s %d' % seed,
- '-v ' * verbosity,
- '--monitor-native-crashes',
- '--kill-process-after-error',
- extra_args,
- '%d' % event_count]
- return self.RunShellCommand(' '.join(cmd),
- timeout_time=event_count*throttle*1.5)
« no previous file with comments | « no previous file | build/android/run_monkey_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698