Files
android_development/cmds/monkey/Android.bp
Siarhei Vishniakou 6a3f1891a8 Add test for MonkeySourceScript
This is the first test that will cover the behaviour of monkey command.
It's being added so that we can provably solve bugs in the monkey code
in the future.

It also highlights the incorrect behaviour of the current PinchZoom
command: it uses the wrong ACTION_POINTER_DOWN event, and it lacks an
ACTION_UP event.

Bug: 281806933
Test: atest monkey_test
Change-Id: Idad80fc0b2374978ba0a38a64c0de28259c389bc
2023-10-17 08:11:37 -07:00

41 lines
921 B
Plaintext

// Copyright 2008 The Android Open Source Project
//
package {
// See: http://go/android-license-faq
default_applicable_licenses: ["Android-Apache-2.0"],
}
//###############################################################
java_binary {
name: "monkey",
srcs: ["**/*.java"],
wrapper: "monkey.sh",
}
android_test {
// This test does not need to run on device. It's a regular Java unit test. But it needs to
// access some framework code like MotionEvent, KeyEvent, InputDevice, etc, which is currently
// not available for the host.
// Therefore, we are relying on 'android_test' here until ravenwood is ready.
name: "monkey_test",
srcs: ["**/*.java",
"**/*.kt",
],
kotlincflags: [
"-Werror",
],
static_libs: [
"androidx.test.runner",
],
libs: [
"junit",
],
test_suites: [
"general-tests",
],
}