| //######################################################################## |
| // Build WmTests package |
| //######################################################################## |
| |
| package { |
| // See: http://go/android-license-faq |
| // A large-scale-change added 'default_applicable_licenses' to import |
| // all of the 'license_kinds' from "frameworks_base_license" |
| // to get the below license kinds: |
| // SPDX-license-identifier-Apache-2.0 |
| default_applicable_licenses: ["frameworks_base_license"], |
| } |
| |
| // Include all test java files. |
| filegroup { |
| name: "wmtests-sources", |
| srcs: [ |
| "src/**/*.java", |
| ], |
| } |
| |
| genrule { |
| name: "wmtests.protologsrc", |
| srcs: [ |
| ":protolog-groups", |
| ":wmtests-sources", |
| ], |
| tools: ["protologtool"], |
| cmd: "$(location protologtool) transform-protolog-calls " + |
| "--protolog-class com.android.internal.protolog.common.ProtoLog " + |
| "--protolog-impl-class com.android.internal.protolog.ProtoLogImpl " + |
| "--protolog-cache-class 'com.android.server.wm.ProtoLogCache' " + |
| "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + |
| "--loggroups-jar $(location :protolog-groups) " + |
| "--output-srcjar $(out) " + |
| "$(locations :wmtests-sources)", |
| out: ["wmtests.protolog.srcjar"], |
| } |
| |
| android_test { |
| name: "WmTests", |
| |
| // We only want this apk build for tests. |
| srcs: [ |
| ":wmtests.protologsrc", |
| "src/**/*.aidl", |
| ], |
| |
| static_libs: [ |
| "frameworks-base-testutils", |
| "services.core", |
| "service-permission.stubs.system_server", |
| "androidx.test.runner", |
| "androidx.test.rules", |
| "junit-params", |
| "mockito-target-extended-minus-junit4", |
| "platform-test-annotations", |
| "servicestests-utils", |
| "testng", |
| "truth", |
| "testables", |
| "hamcrest-library", |
| "flag-junit", |
| "platform-compat-test-rules", |
| "CtsSurfaceValidatorLib", |
| "service-sdksandbox.impl", |
| "com.android.window.flags.window-aconfig-java", |
| "flag-junit", |
| ], |
| |
| libs: [ |
| "android.hardware.power-V1-java", |
| "android.test.mock", |
| "android.test.base", |
| "android.test.runner", |
| ], |
| |
| defaults: [ |
| "modules-utils-testable-device-config-defaults", |
| ], |
| |
| // These are not normally accessible from apps so they must be explicitly included. |
| jni_libs: [ |
| "libdexmakerjvmtiagent", |
| "libstaticjvmtiagent", |
| ], |
| |
| platform_apis: true, |
| test_suites: [ |
| "device-tests", |
| "automotive-tests", |
| ], |
| |
| certificate: "platform", |
| |
| dxflags: ["--multi-dex"], |
| |
| optimize: { |
| enabled: false, |
| }, |
| |
| data: [ |
| ":OverlayTestApp", |
| ], |
| } |