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", |
Christophe Koessler | 5036168 | 2019-12-17 16:40:47 -0800 | [diff] [blame] | 31 | "androidx.test.core", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 32 | "androidx.test.runner", |
| 33 | "androidx.test.rules", |
| 34 | "mockito-target-minus-junit4", |
| 35 | "platform-test-annotations", |
| 36 | "ShortcutManagerTestUtils", |
| 37 | "truth-prebuilt", |
| 38 | "testables", |
| 39 | "testng", |
| 40 | "ub-uiautomator", |
| 41 | "platformprotosnano", |
| 42 | "hamcrest-library", |
| 43 | "servicestests-utils", |
Alexander Dorokhine | fed5ce2 | 2019-11-19 15:16:33 -0800 | [diff] [blame] | 44 | "service-appsearch", |
Anton Hansson | 97369f8 | 2019-11-22 11:40:08 +0000 | [diff] [blame] | 45 | "service-jobscheduler", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 46 | ], |
| 47 | |
| 48 | aidl: { |
| 49 | local_include_dirs: ["aidl"], |
| 50 | }, |
| 51 | |
| 52 | libs: [ |
| 53 | "android.hidl.manager-V1.0-java", |
| 54 | "android.hardware.tv.cec-V1.0-java", |
| 55 | "android.test.mock", |
| 56 | "android.test.base", |
| 57 | "android.test.runner", |
| 58 | ], |
| 59 | |
| 60 | platform_apis: true, |
| 61 | test_suites: ["device-tests"], |
| 62 | |
| 63 | certificate: "platform", |
| 64 | |
| 65 | // These are not normally accessible from apps so they must be explicitly included. |
| 66 | jni_libs: [ |
| 67 | "libbacktrace", |
| 68 | "libbase", |
| 69 | "libbinder", |
| 70 | "libbinderthreadstate", |
| 71 | "libc++", |
| 72 | "libcutils", |
| 73 | "liblog", |
| 74 | "liblzma", |
| 75 | "libnativehelper", |
Tim Murray | 676d42d | 2019-02-13 20:47:46 -0800 | [diff] [blame] | 76 | "libpsi", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 77 | "libui", |
Elliott Hughes | fc885bb | 2018-12-12 12:32:15 -0800 | [diff] [blame] | 78 | "libunwindstack", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 79 | "libutils", |
Jeongik Cha | e5865b8 | 2019-10-15 17:03:51 +0900 | [diff] [blame] | 80 | "netd_aidl_interface-cpp", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 81 | ], |
| 82 | |
| 83 | dxflags: ["--multi-dex"], |
| 84 | |
| 85 | optimize: { |
| 86 | enabled: false, |
| 87 | }, |
Dan Shi | bcef6ae | 2019-07-26 14:16:43 -0700 | [diff] [blame] | 88 | |
| 89 | data: [":JobTestApp"], |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 90 | } |
| 91 | |
| 92 | java_library { |
| 93 | name: "servicestests-utils", |
| 94 | srcs: [ |
| 95 | "utils/**/*.java", |
| 96 | ], |
| 97 | static_libs: [ |
Brett Chabot | c45f171 | 2018-12-10 16:03:34 -0800 | [diff] [blame] | 98 | "junit", |
Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 99 | "mockito-target-minus-junit4", |
| 100 | ], |
| 101 | libs: [ |
| 102 | "android.test.runner", |
| 103 | ], |
| 104 | } |
| 105 | |
| 106 | filegroup { |
| 107 | name: "servicestests-SuspendTestApp-files", |
| 108 | srcs: [ |
| 109 | "src/com/android/server/pm/SuspendPackagesTest.java", |
| 110 | ], |
| 111 | } |