Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 1 | //######################################################################## |
| 2 | // Build FrameworksServicesTests package |
| 3 | //######################################################################## |
| 4 | |
| 5 | android_test { |
| 6 | name: "FrameworksServicesTests", |
| 7 | |
| 8 | // Include all test java files. |
| 9 | srcs: [ |
| 10 | "src/**/*.java", |
Winson | d9d1736 | 2019-10-02 12:41:29 -0700 | [diff] [blame] | 11 | "src/**/*.kt", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 12 | |
| 13 | "aidl/com/android/servicestests/aidl/INetworkStateObserver.aidl", |
| 14 | "aidl/com/android/servicestests/aidl/ICmdReceiverService.aidl", |
| 15 | |
| 16 | "test-apps/JobTestApp/src/**/*.java", |
| 17 | |
| 18 | "test-apps/SuspendTestApp/src/**/*.java", |
| 19 | ], |
| 20 | static_libs: [ |
| 21 | "frameworks-base-testutils", |
| 22 | "services.accessibility", |
| 23 | "services.appwidget", |
| 24 | "services.autofill", |
| 25 | "services.backup", |
| 26 | "services.core", |
| 27 | "services.devicepolicy", |
| 28 | "services.net", |
| 29 | "services.usage", |
| 30 | "guava", |
| 31 | "androidx.test.runner", |
| 32 | "androidx.test.rules", |
| 33 | "mockito-target-minus-junit4", |
| 34 | "platform-test-annotations", |
| 35 | "ShortcutManagerTestUtils", |
| 36 | "truth-prebuilt", |
| 37 | "testables", |
| 38 | "testng", |
| 39 | "ub-uiautomator", |
| 40 | "platformprotosnano", |
| 41 | "hamcrest-library", |
| 42 | "servicestests-utils", |
atrost | bc0f406 | 2019-07-24 14:12:48 +0100 | [diff] [blame] | 43 | "xml-writer-device-lib", |
Makoto Onuki | 792de8d | 2019-07-16 16:19:01 -0700 | [diff] [blame] | 44 | "jobscheduler-service", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 45 | ], |
| 46 | |
| 47 | aidl: { |
| 48 | local_include_dirs: ["aidl"], |
| 49 | }, |
| 50 | |
| 51 | libs: [ |
| 52 | "android.hidl.manager-V1.0-java", |
| 53 | "android.hardware.tv.cec-V1.0-java", |
| 54 | "android.test.mock", |
| 55 | "android.test.base", |
| 56 | "android.test.runner", |
| 57 | ], |
| 58 | |
| 59 | platform_apis: true, |
| 60 | test_suites: ["device-tests"], |
| 61 | |
| 62 | certificate: "platform", |
| 63 | |
| 64 | // These are not normally accessible from apps so they must be explicitly included. |
| 65 | jni_libs: [ |
| 66 | "libbacktrace", |
| 67 | "libbase", |
| 68 | "libbinder", |
| 69 | "libbinderthreadstate", |
| 70 | "libc++", |
| 71 | "libcutils", |
| 72 | "liblog", |
| 73 | "liblzma", |
| 74 | "libnativehelper", |
Tim Murray | 676d42d | 2019-02-13 20:47:46 -0800 | [diff] [blame] | 75 | "libpsi", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 76 | "libui", |
Elliott Hughes | fc885bb | 2018-12-12 12:32:15 -0800 | [diff] [blame] | 77 | "libunwindstack", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 78 | "libutils", |
Jeongik Cha | e5865b8 | 2019-10-15 17:03:51 +0900 | [diff] [blame] | 79 | "netd_aidl_interface-cpp", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 80 | ], |
| 81 | |
| 82 | dxflags: ["--multi-dex"], |
| 83 | |
| 84 | optimize: { |
| 85 | enabled: false, |
| 86 | }, |
Dan Shi | bcef6ae | 2019-07-26 14:16:43 -0700 | [diff] [blame] | 87 | |
| 88 | data: [":JobTestApp"], |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | java_library { |
| 92 | name: "servicestests-utils", |
| 93 | srcs: [ |
| 94 | "utils/**/*.java", |
| 95 | ], |
| 96 | static_libs: [ |
Brett Chabot | c45f171 | 2018-12-10 16:03:34 -0800 | [diff] [blame] | 97 | "junit", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 98 | "mockito-target-minus-junit4", |
| 99 | ], |
| 100 | libs: [ |
| 101 | "android.test.runner", |
| 102 | ], |
| 103 | } |
| 104 | |
| 105 | filegroup { |
| 106 | name: "servicestests-SuspendTestApp-files", |
| 107 | srcs: [ |
| 108 | "src/com/android/server/pm/SuspendPackagesTest.java", |
| 109 | ], |
| 110 | } |