| Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 1 | //######################################################################## |
| 2 | // Build WmTests package |
| 3 | //######################################################################## |
| 4 | |
| Bob Badour | e539dba | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 5 | package { |
| 6 | // See: http://go/android-license-faq |
| 7 | // A large-scale-change added 'default_applicable_licenses' to import |
| 8 | // all of the 'license_kinds' from "frameworks_base_license" |
| 9 | // to get the below license kinds: |
| 10 | // SPDX-license-identifier-Apache-2.0 |
| 11 | default_applicable_licenses: ["frameworks_base_license"], |
| 12 | } |
| 13 | |
| Hongwei Wang | 6014caf | 2020-07-20 18:04:35 -0700 | [diff] [blame] | 14 | // Include all test java files. |
| 15 | filegroup { |
| 16 | name: "wmtests-sources", |
| 17 | srcs: [ |
| 18 | "src/**/*.java", |
| 19 | ], |
| 20 | } |
| 21 | |
| 22 | genrule { |
| 23 | name: "wmtests.protologsrc", |
| 24 | srcs: [ |
| 25 | ":protolog-groups", |
| 26 | ":wmtests-sources", |
| 27 | ], |
| 28 | tools: ["protologtool"], |
| 29 | cmd: "$(location protologtool) transform-protolog-calls " + |
| 30 | "--protolog-class com.android.internal.protolog.common.ProtoLog " + |
| 31 | "--protolog-impl-class com.android.internal.protolog.ProtoLogImpl " + |
| 32 | "--protolog-cache-class 'com.android.server.wm.ProtoLogCache' " + |
| 33 | "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + |
| 34 | "--loggroups-jar $(location :protolog-groups) " + |
| 35 | "--output-srcjar $(out) " + |
| 36 | "$(locations :wmtests-sources)", |
| 37 | out: ["wmtests.protolog.srcjar"], |
| 38 | } |
| 39 | |
| Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 40 | android_test { |
| 41 | name: "WmTests", |
| 42 | |
| 43 | // We only want this apk build for tests. |
| Hongwei Wang | 6014caf | 2020-07-20 18:04:35 -0700 | [diff] [blame] | 44 | srcs: [":wmtests.protologsrc"], |
| Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 45 | |
| 46 | static_libs: [ |
| Ram Muthiah | a4bb044 | 2019-12-11 17:37:00 -0800 | [diff] [blame] | 47 | "frameworks-base-testutils", |
| Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 48 | "services.core", |
| 49 | "androidx.test.runner", |
| 50 | "androidx.test.rules", |
| 51 | "mockito-target-extended-minus-junit4", |
| 52 | "platform-test-annotations", |
| 53 | "servicestests-utils", |
| Yuncheol Heo | 13a6eb6 | 2020-03-04 23:50:37 -0800 | [diff] [blame] | 54 | "testng", |
| Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 55 | "truth-prebuilt", |
| 56 | "testables", |
| 57 | "ub-uiautomator", |
| 58 | "hamcrest-library", |
| Benjamin Franz | 06bb87d | 2020-11-16 16:56:13 +0000 | [diff] [blame] | 59 | "platform-compat-test-rules", |
| chaviw | d32068a | 2021-12-13 16:06:21 -0600 | [diff] [blame] | 60 | "CtsSurfaceValidatorLib", |
| Gavin Corkery | 5c111ff | 2022-03-03 16:19:48 +0000 | [diff] [blame] | 61 | "service-sdksandbox.impl", |
| Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 62 | ], |
| 63 | |
| 64 | libs: [ |
| Jeongik Cha | 969b921 | 2021-01-28 00:49:47 +0900 | [diff] [blame] | 65 | "android.hardware.power-V1-java", |
| Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 66 | "android.test.mock", |
| 67 | "android.test.base", |
| 68 | "android.test.runner", |
| 69 | ], |
| 70 | |
| Mariia Sandrikova | 292826e | 2022-12-25 19:47:59 +0000 | [diff] [blame^] | 71 | defaults: [ |
| 72 | "modules-utils-testable-device-config-defaults", |
| 73 | ], |
| 74 | |
| Colin Cross | 35be424 | 2018-11-20 09:46:47 -0800 | [diff] [blame] | 75 | // These are not normally accessible from apps so they must be explicitly included. |
| 76 | jni_libs: [ |
| 77 | "libdexmakerjvmtiagent", |
| 78 | "libstaticjvmtiagent", |
| 79 | ], |
| 80 | |
| 81 | platform_apis: true, |
| 82 | test_suites: ["device-tests"], |
| 83 | |
| 84 | certificate: "platform", |
| 85 | |
| 86 | dxflags: ["--multi-dex"], |
| 87 | |
| 88 | optimize: { |
| 89 | enabled: false, |
| 90 | }, |
| 91 | |
| 92 | } |