summaryrefslogtreecommitdiffstats
path: root/build/android/pylib
diff options
context:
space:
mode:
authorilevy@chromium.org <ilevy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-13 07:47:44 +0000
committerilevy@chromium.org <ilevy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-13 07:47:44 +0000
commitcfcd35727e183f94be3312bcccfc3ee32480bb72 (patch)
tree864f0af796100780c18d52762bcb9df6bf1e833b /build/android/pylib
parent847242a46c160f60743f6d010ecb6cfd31c5f226 (diff)
downloadchromium_src-cfcd35727e183f94be3312bcccfc3ee32480bb72.zip
chromium_src-cfcd35727e183f94be3312bcccfc3ee32480bb72.tar.gz
chromium_src-cfcd35727e183f94be3312bcccfc3ee32480bb72.tar.bz2
Moved RunMonkeyTests out of android_commands.py
(it did not fit) - simplified calling structure. R=frankf@chromium.org,bulach@chromium.org,klundberg@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/10908188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/pylib')
-rw-r--r--build/android/pylib/android_commands.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 2b412f3..740f53c 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)