//######################################################################## // 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-impl", ":protolog-groups", ":wmtests-sources", ], tools: ["protologtool"], cmd: "$(location protologtool) transform-protolog-calls " + "--protolog-class com.android.internal.protolog.common.ProtoLog " + "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + "--loggroups-jar $(location :protolog-groups) " + // Used for the ProtoLogIntegrationTest, where don't test decoding or writing to file // so the parameters below are irrelevant. "--viewer-config-file-path /some/unused/file/path.pb " + "--legacy-viewer-config-file-path /some/unused/file/path.json.gz " + "--legacy-output-file-path /some/unused/file/path.winscope " + // END of irrelevant params. "--output-srcjar $(out) " + "$(locations :wmtests-sources)", out: ["wmtests.protolog.srcjar"], } android_test { name: "WmTests", // We only want this apk build for tests. srcs: [ ":wmtests-sources", "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", ], }