1//######################################################################## 2// Build WmTests package 3//######################################################################## 4 5package { 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 14// 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-impl", 26 ":protolog-groups", 27 ":wmtests-sources", 28 ], 29 tools: ["protologtool"], 30 cmd: "$(location protologtool) transform-protolog-calls " + 31 "--protolog-class com.android.internal.protolog.common.ProtoLog " + 32 "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + 33 "--loggroups-jar $(location :protolog-groups) " + 34 // Used for the ProtoLogIntegrationTest, where don't test decoding or writing to file 35 // so the parameters below are irrelevant. 36 "--viewer-config-file-path /some/unused/file/path.pb " + 37 "--legacy-viewer-config-file-path /some/unused/file/path.json.gz " + 38 "--legacy-output-file-path /some/unused/file/path.winscope " + 39 // END of irrelevant params. 40 "--output-srcjar $(out) " + 41 "$(locations :wmtests-sources)", 42 out: ["wmtests.protolog.srcjar"], 43} 44 45android_test { 46 name: "WmTests", 47 48 // We only want this apk build for tests. 49 srcs: [ 50 ":wmtests-sources", 51 "src/**/*.aidl", 52 ], 53 54 static_libs: [ 55 "frameworks-base-testutils", 56 "services.core", 57 "service-permission.stubs.system_server", 58 "androidx.test.runner", 59 "androidx.test.rules", 60 "junit-params", 61 "mockito-target-extended-minus-junit4", 62 "platform-test-annotations", 63 "servicestests-utils", 64 "testng", 65 "truth", 66 "testables", 67 "hamcrest-library", 68 "flag-junit", 69 "platform-compat-test-rules", 70 "CtsSurfaceValidatorLib", 71 "service-sdksandbox.impl", 72 "com.android.window.flags.window-aconfig-java", 73 "flag-junit", 74 ], 75 76 libs: [ 77 "android.hardware.power-V1-java", 78 "android.test.mock", 79 "android.test.base", 80 "android.test.runner", 81 ], 82 83 defaults: [ 84 "modules-utils-testable-device-config-defaults", 85 ], 86 87 // These are not normally accessible from apps so they must be explicitly included. 88 jni_libs: [ 89 "libdexmakerjvmtiagent", 90 "libstaticjvmtiagent", 91 ], 92 93 platform_apis: true, 94 test_suites: [ 95 "device-tests", 96 "automotive-tests", 97 ], 98 99 certificate: "platform", 100 101 dxflags: ["--multi-dex"], 102 103 optimize: { 104 enabled: false, 105 }, 106 107 data: [ 108 ":OverlayTestApp", 109 ], 110} 111