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