blob: 079d765868fd419f08f401c5e9a8ba5e3fb13e1c [file] [log] [blame]
Colin Cross35be4242018-11-20 09:46:47 -08001//########################################################################
2// Build WmTests package
3//########################################################################
4
Bob Badoure539dba2021-02-12 17:07:05 -08005package {
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 Wang6014caf2020-07-20 18:04:35 -070014// Include all test java files.
15filegroup {
16 name: "wmtests-sources",
17 srcs: [
18 "src/**/*.java",
19 ],
20}
21
22genrule {
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 Cross35be4242018-11-20 09:46:47 -080040android_test {
41 name: "WmTests",
42
43 // We only want this apk build for tests.
Hongwei Wang6014caf2020-07-20 18:04:35 -070044 srcs: [":wmtests.protologsrc"],
Colin Cross35be4242018-11-20 09:46:47 -080045
46 static_libs: [
Ram Muthiaha4bb0442019-12-11 17:37:00 -080047 "frameworks-base-testutils",
Colin Cross35be4242018-11-20 09:46:47 -080048 "services.core",
49 "androidx.test.runner",
50 "androidx.test.rules",
51 "mockito-target-extended-minus-junit4",
52 "platform-test-annotations",
53 "servicestests-utils",
Yuncheol Heo13a6eb62020-03-04 23:50:37 -080054 "testng",
Colin Cross35be4242018-11-20 09:46:47 -080055 "truth-prebuilt",
56 "testables",
57 "ub-uiautomator",
58 "hamcrest-library",
Benjamin Franz06bb87d2020-11-16 16:56:13 +000059 "platform-compat-test-rules",
chaviwd32068a2021-12-13 16:06:21 -060060 "CtsSurfaceValidatorLib",
Gavin Corkery5c111ff2022-03-03 16:19:48 +000061 "service-sdksandbox.impl",
Colin Cross35be4242018-11-20 09:46:47 -080062 ],
63
64 libs: [
Jeongik Cha969b9212021-01-28 00:49:47 +090065 "android.hardware.power-V1-java",
Colin Cross35be4242018-11-20 09:46:47 -080066 "android.test.mock",
67 "android.test.base",
68 "android.test.runner",
69 ],
70
71 // These are not normally accessible from apps so they must be explicitly included.
72 jni_libs: [
73 "libdexmakerjvmtiagent",
74 "libstaticjvmtiagent",
75 ],
76
77 platform_apis: true,
78 test_suites: ["device-tests"],
79
80 certificate: "platform",
81
82 dxflags: ["--multi-dex"],
83
84 optimize: {
85 enabled: false,
86 },
87
88}