Commit Graph

192 Commits

Author SHA1 Message Date
Jeff Brown
82df76b040 Really don't send POWER or ENDCALL.
Change-Id: If55c6bc7565a9a6b493da16fac5c7ad3c621684f
2011-01-20 17:41:18 -08:00
Yu Shan Emily Lau
080c237638 Merge "Fixed the monkey option - killProcessAfterError is not beging checked in ANR. bug#3146736" into honeycomb 2011-01-20 10:21:37 -08:00
Jeff Brown
8a2659dc0d Prevent monkey from turning off the screen.
Bug: 3371251
Change-Id: Iadae29e8e4a67052746b8e2d2f5f542e4ee6dcc5
2011-01-19 19:43:49 -08:00
Yu Shan Emily Lau
bf86c3e1ce Fixed the monkey option - killProcessAfterError is not beging checked in ANR. bug#3146736
Change-Id: I82dc5d28a218f8e2a6e7c13f27a4aca398cd904d
2011-01-14 19:25:11 -08:00
Brett Chabot
b45644eac0 Replace use of ro.monkey with ro.test_harness.
Bug 3329873

Change-Id: Ia681803c3d0b0afeceb178b8314c9d7227d99355
2011-01-09 14:11:50 -08:00
Jeff Brown
585ab96950 Add support for multitouch pinch-zoom gesture to monkey.
Change-Id: Ib28f2ede95dbe01eae4d9c72906b6fdfeda44ce4
2010-12-14 13:42:22 -08:00
Yu Shan Emily Lau
af2fc1a4e2 Adjusted the motionEvent time to the acutal time when then event is send out to the queue.
Change-Id: I722508829c79028a7345a4dea0517fc1117b8fa5
2010-12-09 18:36:39 -08:00
Dima Zavin
9f8e7b45b2 monkey: trap SIGHUP in shell before launching
Change-Id: Ia79361858baa72970ba15d2d1ce0290d0bd38967
Signed-off-by: Dima Zavin <dima@android.com>
2010-12-09 14:22:21 -08:00
Jeff Brown
f083bd43a0 Monkey updates for new keyboard features.
Add the new volume mute key as a system key.
Use virtual keyboard during injection.
Also fixed a deprecation warning for using an old Intent API.

Bug: 2912307
Bug: 3221301
Change-Id: I056844509112727aa3541223f090cc500c55fc41
2010-11-23 15:51:40 -08:00
Yu Shan Emily Lau
05cd1145d4 am 35ccee0b: am 9bfa6f90: Merge "1) add the bugreport option which allow the scripted monkey to capature the bugrepor and save it to the sdcard wherenever there is a ANR, java crash and native crash. 2) Add a new option in the scripted monkey which can enter a string
Merge commit '35ccee0b22501feda0249dfcaaff2a9fdcd363b6'

* commit '35ccee0b22501feda0249dfcaaff2a9fdcd363b6':
  1) add the bugreport option which allow the scripted monkey to capature the bugrepor and save it to the sdcard wherenever there is a ANR, java crash and native crash.
2010-10-21 13:44:36 -07:00
Yu Shan Emily Lau
35ccee0b22 am 9bfa6f90: Merge "1) add the bugreport option which allow the scripted monkey to capature the bugrepor and save it to the sdcard wherenever there is a ANR, java crash and native crash. 2) Add a new option in the scripted monkey which can enter a string through the s
Merge commit '9bfa6f90b8c56ed7404c0c07a70e27a9fbad3c23' into gingerbread-plus-aosp

* commit '9bfa6f90b8c56ed7404c0c07a70e27a9fbad3c23':
  1) add the bugreport option which allow the scripted monkey to capature the bugrepor and save it to the sdcard wherenever there is a ANR, java crash and native crash.
2010-10-20 14:06:56 -07:00
Yu Shan Emily Lau
e8b416049b 1) add the bugreport option which allow the scripted monkey to capature the bugrepor and save it to the sdcard wherenever there is a ANR, java crash and native crash.
2) Add a new option in the scripted monkey which can enter a string through the shell command input text <string>

Change-Id: Iab7478fdc594c07e5166091d29dc644e430e43cb
2010-10-19 22:04:33 -07:00
Jeff Brown
b0b841029a Use framework-supplied keycode symbols.
KeyEvent now offers an (@hidden) method to map keycodes to symbolic names
in a way that is compatible with what Monkey was already doing itself.
Now we shouldn't need to change monkey each time we add new keycodes.

Bug: 2912307
Change-Id: I9cd729b17c3f19505a4d3afcce465dad0c64cce0
2010-10-14 23:02:59 -07:00
Ying Wang
cbe0d5b963 resolved conflicts for merge of de14fbd4 to gingerbread-plus-aosp
Change-Id: I53302710ca0698daa5fe8ca3ce631a70d1578463
2010-10-07 14:59:03 -07:00
Ying Wang
de14fbd4b1 Set monkey process name
So you can find it easily with "ps" or "top".

Change-Id: Id52cb8bb1680bd2cc24043d08a94f0a304f1e436
2010-10-07 13:04:24 -07:00
Brad Fitzpatrick
feebca8ba2 am 9c1a73ba: Update Monkey to new StrictMode API.
Merge commit '9c1a73ba8a6b6cee05f235ef71975c427a9f3a3c' into gingerbread-plus-aosp

* commit '9c1a73ba8a6b6cee05f235ef71975c427a9f3a3c':
  Update Monkey to new StrictMode API.
2010-10-01 13:07:42 -07:00
Ying Wang
58c636c9bc am 45550faa: Merge "Don\'t send non-existent system keys." into gingerbread
Merge commit '45550faad0f683d1393ea20144246ed43fc19899' into gingerbread-plus-aosp

* commit '45550faad0f683d1393ea20144246ed43fc19899':
  Don't send non-existent system keys.
2010-10-01 10:48:30 -07:00
Brad Fitzpatrick
9c1a73ba8a Update Monkey to new StrictMode API.
Change-Id: I0f2e90496c4dece8ee3766170d8a1fe2d22a7ff4
2010-10-01 10:48:01 -07:00
Ying Wang
5ee69f6f2c Don't send non-existent system keys.
Send only if the system key physically exists.

Change-Id: I8fa102db679c55e5bfba1c9a68ecf2bc196021cd
2010-09-29 13:23:56 -07:00
Dianne Hackborn
ebb0b03e17 am d424b8d9: Prepare for a new IActivityController method.
Merge commit 'd424b8d9ccb569c4a2f01de248068fd130e3bd82' into gingerbread-plus-aosp

* commit 'd424b8d9ccb569c4a2f01de248068fd130e3bd82':
  Prepare for a new IActivityController method.
2010-09-23 16:02:22 -07:00
Dianne Hackborn
d424b8d9cc Prepare for a new IActivityController method.
Change-Id: I30823fe0c06aef35a2773760ec938e7979cd1037
2010-09-23 14:51:56 -07:00
Yu Shan Emily Lau
64a1698a30 am 67aad2d8: Merge "Add the simple script log for the statbility stress test. Add the randomize script option." into gingerbread
Merge commit '67aad2d8d51e9d48730f0c6e4848c60b1a9d0798' into gingerbread-plus-aosp

* commit '67aad2d8d51e9d48730f0c6e4848c60b1a9d0798':
  Add the simple script log for the statbility stress test.
2010-08-30 15:56:38 -07:00
Yu Shan Emily Lau
6a6c533129 Add the simple script log for the statbility stress test.
Add the randomize script option.

Change-Id: I7fbbd3b78a2fc5fe5300ac4811540d0cd2070688
2010-08-30 15:31:33 -07:00
Yu Shan Emily Lau
f1598c4cf4 am ea7d6e8e: Merge "Add the new option for the device sleep time. This is only for the scripted monkey." into gingerbread
Merge commit 'ea7d6e8e6568b777693c52183e9abf973786a6b5' into gingerbread-plus-aosp

* commit 'ea7d6e8e6568b777693c52183e9abf973786a6b5':
  Add the new option for the device sleep time. This is only for the scripted monkey.
2010-08-26 15:27:57 -07:00
Yu Shan Emily Lau
9ab015751d Add the new option for the device sleep time. This is only for the scripted monkey.
Change-Id: I4a6bd7133bbd2da9594a47e1f5529c5358cd9aed
2010-08-26 14:18:18 -07:00
Brad Fitzpatrick
616acdb9cd am 06bcd705: Quiet harmless StrictMode violations caused by the Monkey.
Merge commit '06bcd705606070aa71425fc557e72592a2405a0a' into gingerbread-plus-aosp

* commit '06bcd705606070aa71425fc557e72592a2405a0a':
  Quiet harmless StrictMode violations caused by the Monkey.
2010-08-25 10:10:40 -07:00
Brad Fitzpatrick
06bcd70560 Quiet harmless StrictMode violations caused by the Monkey.
The monkey writes to System.out which is effectively a file and is
caught by StrictMode.

BUG=2947447

Change-Id: Iab38917f18baa319dad34d0c788bc9a10a041796
2010-08-25 09:45:49 -07:00
Yu Shan Emily Lau
6fae0ba472 am 27d0ec1e: Merge "Add the new option for the scripted monkey profile testing." into gingerbread
Merge commit '27d0ec1e87dcf41960f87f203c1822e88f99ea38' into gingerbread-plus-aosp

* commit '27d0ec1e87dcf41960f87f203c1822e88f99ea38':
  Add the new option for the scripted monkey profile testing.
2010-08-24 20:10:38 -07:00
Yu Shan Emily Lau
6035a57a97 Add the new option for the scripted monkey profile testing.
Change-Id: I1013a1a0daed948f509d9a29077f0e282baf1a10
2010-08-24 19:49:38 -07:00
Yu Shan Emily Lau
599fcd2199 am 3307fdcc: Merge "Added the new keyword tap for the scripted monkey." into gingerbread
Merge commit '3307fdcce1f322ed72cc3d3a8d9da87aae856531' into gingerbread-plus-aosp

* commit '3307fdcce1f322ed72cc3d3a8d9da87aae856531':
  Added the new keyword tap for the scripted monkey.
2010-08-19 15:49:25 -07:00
Yu Shan Emily Lau
39b0199222 Added the new keyword tap for the scripted monkey.
Change-Id: Iabfc462f8fc853b3235aa0d742fa46c97e980b77
2010-08-19 15:01:38 -07:00
Yu Shan Emily Lau
2929dce37a am b409cf9c: Merge "Add the monkey event which allows the scripted monkey to execute the shell command." into gingerbread
Merge commit 'b409cf9ca1251df1145139580f6809364fb3881f' into gingerbread-plus-aosp

* commit 'b409cf9ca1251df1145139580f6809364fb3881f':
  Add the monkey event which allows the scripted monkey to execute the shell command.
2010-08-19 11:14:05 -07:00
Yu Shan Emily Lau
4fbc8db891 Add the monkey event which allows the scripted monkey to execute the shell command.
Change-Id: Id5548fc42fc5c7bee6879fffc580e134a75572ab
2010-08-19 11:03:34 -07:00
Jean-Baptiste Queru
8930942de2 am 4388d2c3: Merge "Monkey: Set the name of the process to distinguish from generic name (app_process)"
Merge commit '4388d2c333c164ce67db6d4a59cded8dfea9fc9a' into gingerbread-plus-aosp

* commit '4388d2c333c164ce67db6d4a59cded8dfea9fc9a':
  Monkey: Set the name of the process to distinguish from generic name (app_process)
2010-08-16 13:16:44 -07:00
Ying Wang
a27eb4c7d9 am 8fc77898: Fix keycode. [Cherry-pick from master]
Merge commit '8fc778984cd0b737df102fca14be7c1815505b80' into gingerbread-plus-aosp

* commit '8fc778984cd0b737df102fca14be7c1815505b80':
  Fix keycode. [Cherry-pick from master]
2010-08-12 13:14:11 -07:00
Ying Wang
8fc778984c Fix keycode. [Cherry-pick from master]
see frameworks/base/core/java/android/view/KeyEvent.java.

Change-Id: Ic9a355b36815c4ac7db9c57c14bfe933585cf963
http://b/issue?id=2830562
2010-08-12 11:30:41 -07:00
Vairavan Srinivasan
83c57574b7 Monkey: Set the name of the process to distinguish from generic name (app_process)
Change-Id: If58ff437bfbea421dc00a2d85547267c010871e4
2010-08-03 10:00:55 -07:00
Vairavan Srinivasan
474fe56acc am 688e62cd: Monkey: Changes to release lock before reporting ANR and meminfo
Merge commit '688e62cd116d0bc17ad162915908764c67dd6045' into gingerbread-plus-aosp

* commit '688e62cd116d0bc17ad162915908764c67dd6045':
  Monkey: Changes to release lock before reporting ANR and meminfo
2010-07-22 09:30:38 -07:00
Vairavan Srinivasan
688e62cd11 Monkey: Changes to release lock before reporting ANR and meminfo
Report ANR, dumpsys after releasing lock on Monkey.this.
This ensures the availability of the lock to Activity controller's
appNotResponding.

Reporting dumpsys while holding the lock on this causes a cyclic
deadlock, when twoANRs are reported (one after the other).

Monkey's ActivityController is registered to ActivityManagerService
for handling ANR.The first ANR caused by either service timeout or
broadcast timeout is reported byActivityManagerService to Monkey's
ActivityController via Binder. Meanwhile, the lock on
ActivityManagerService is held by serviceTimeout or broadcastTimeout.

appNotResponding corresponding to first ANR reports procrank and
acquires a lock onMonkey.this and sets few bool variables like
mRequestAnrTraces and mRequestDumpsysMemInfoand returns the control
to ActivityManagerService's service/broadcast timeout.
VM executing monkey process switches the control to main monkey
thread and it acquires thelock on Monkey.this and proceeds to report
ANR traces.

Meanwhile, a second ANR occurs and Activity Manager Service invokes
ActivityController's appNotResponding (via binder). appNotResponding
reports the procrank and waits to acquire the lock on Monkey.this
which is being held by Monkey's main thread(busy reporting first ANR).
This results in a blocking wait for ActivityManagerService's
appNotRespondingLocked() (corresponding to second ANR).

Meanwhile, the monkey's main thread (holding lock on Monkey.this)
tries to report the meminfo for first ANR, invokes
reportDumpsysMemInfo(), which in turn causes the android runtime to
launch dumpsys process. The dumpsys process queries service manager
to get a reference to meminfo service and invoke dump() on the same.
The meminfo service is created by ActivityManagerService's
setSystemProcess(). The dump() method tries to acquire a lock on
ActivityManagerService which is held by ActivityManagerService's
service/broadcasttimeout (awaiting the response from
ActivityController for the second ANR).

This cyclic deadlock continues for a minute after which WatchDog
thread of system_server kills system_server as it hasn't got the
response from ActivityManagerService's monitor(). The monitor()
of ActivityManagerService too tries to acquire lock on this and is
invoked once in every minute.

DEADLOCK:
--------

ActivityManager --> ActivityController  --> Monkey Main  --> MemInfo
--> ActivityManager

Change-Id: I7718eff332e5551b1950ab1c45395bf1ff4b1bda
2010-07-20 16:07:25 -07:00
Ying Wang
5ce45c93ad Fix keycode
4 new key codes were added since gingerbread.
bug: http://b/issue?id=2830562

Change-Id: I91a55ef6ca9244bc053e25b6dd8d514cb3f106e9
2010-07-09 15:07:19 -07:00
Yu Shan Emily Lau
ec87ca5f3a am 34ca4b64: Merge "Add the support for the alarmManager and force the device to wake up." into froyo
Merge commit '34ca4b646b20cc209b06fec482e6c77dbc92d220' into gingerbread

* commit '34ca4b646b20cc209b06fec482e6c77dbc92d220':
  Add the support for the alarmManager and force the device to wake up.
2010-07-08 11:31:07 -07:00
Yu Shan Emily Lau
52bbaa3052 Add the support for the alarmManager and force the device to wake up.
Change-Id: Ib4a2f9cb580eadf6771b103399e14f932d50cb1c
2010-07-07 12:13:32 -07:00
Yu Shan Emily Lau
a96f73a683 am 1a132581: Merge "Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out." into froyo
Merge commit '1a132581a5ce6188989d8522d227392c05cb42f6' into froyo-plus-aosp

* commit '1a132581a5ce6188989d8522d227392c05cb42f6':
  Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out.
2010-06-24 15:42:29 -07:00
Yu Shan Emily Lau
3bacdf9300 am 1a132581: Merge "Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out." into froyo
Merge commit '1a132581a5ce6188989d8522d227392c05cb42f6' into gingerbread

* commit '1a132581a5ce6188989d8522d227392c05cb42f6':
  Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out.
2010-06-24 15:41:10 -07:00
Yu Shan Emily Lau
07aeb8c358 Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out.
Change-Id: I3d98d56128b8a96ba712c7e11280e3ab88a7cc4a
2010-06-24 14:20:16 -07:00
Yu Shan Emily Lau
59b6dce0d5 am 39d7a745: Merge "Added the instrumentation and power log monkey events fro the new power framework." into froyo
Merge commit '39d7a7451b7e43dc1d71ac983821e76c88775a81' into froyo-plus-aosp

* commit '39d7a7451b7e43dc1d71ac983821e76c88775a81':
  Added the instrumentation and power log monkey events fro the new power framework.
2010-05-28 15:50:23 -07:00
Yu Shan Emily Lau
2952b49c7c Added the instrumentation and power log monkey events fro the new power framework.
Change-Id: I3102e6caaba8763a2197ff80f13c8d127ea42316
2010-05-28 13:48:42 -07:00
The Android Open Source Project
99096976d0 merge from open-source master
Change-Id: I4bbf0fccef174a7f0eb8241b422f846ea21c3349
2010-05-12 09:27:49 -07:00
Johan Alfven
f515f1a6c8 Added missing --pct-syskeys to processOptions in Monkey
According to the developer guidelines
http://developer.android.com/guide/developing/tools/monkey.html
it should be possible to run monkey with option --pct-syskeys <percent>
to adjust percentage of "system" key events. (These are keys that are
generally reserved for use by the system, such as Home, Back,
Start Call, End Call, or Volume controls.) However, when trying
to run monkey with that option it fails with:
** Error: Unknown option: --pct-syskeys
The function processOptions in file Monkey.java was missing the
option --pct-syskeys.

Change-Id: I5d328fc93dfe67ed7a905735d6762c7f91c69838
2010-05-11 09:11:43 +02:00
Ying Wang
84086578bb Add timestamp to monkey log
Change-Id: Ia477aca8b00d06049621d848f5792c291e3db040
2010-04-14 19:25:27 -07:00