1// Copyright (C) 2021 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_team: "trendy_team_rubidium_sdk_runtime", 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20java_defaults { 21 name: "SdkSandboxUnitTestsDefault", 22 min_sdk_version: "Tiramisu", 23 target_sdk_version: "Tiramisu", 24 test_suites: [ 25 "mts-adservices", 26 "general-tests", 27 ], 28 static_libs: [ 29 "androidx.test.runner", 30 "compatibility-device-util-axt-minus-dexmaker", 31 "mockito-target-extended-minus-junit4", 32 "truth", 33 "flag-junit", 34 "platform-test-annotations", 35 "adservices-test-utility", 36 "SdkSandboxTestUtils", 37 "SdkSandbox-java-lib", 38 ], 39 jni_libs: [ 40 // Required for ExtendedMockito 41 "libdexmakerjvmtiagent", 42 "libstaticjvmtiagent", 43 ], 44 libs: [ 45 "android.test.base", 46 "android.test.mock", 47 "android.test.runner", 48 "framework-sdksandbox.impl", 49 "framework-configinfrastructure", 50 ], 51 // Test coverage system runs on different devices. Need to 52 // compile for all architecture. 53 compile_multilib: "both", 54} 55 56android_test { 57 name: "SdkSandboxUnitTests", 58 srcs: [ 59 "src/com/android/sdksandbox/*.java", 60 ":sdksandbox_aidl", 61 ":framework-sdksandbox-aidl-sources", 62 ], 63 defaults: ["SdkSandboxUnitTestsDefault"], 64 manifest: "SdkSandboxManifest.xml", 65 test_config: "SdkSandboxTest.xml", 66 data: [ 67 ":TestProviderApp", 68 ], 69 static_libs: [ 70 "androidx.core_core", 71 "androidx.test.rules", 72 "androidx.test.ext.truth", 73 "androidx.test.ext.junit", 74 ], 75} 76 77android_test { 78 name: "SdkSandboxManagerServiceUnitTests", 79 srcs: [ 80 "src/com/android/server/sdksandbox/**/*.java", 81 ":framework-sdksandbox-aidl-sources", 82 ], 83 defaults: ["SdkSandboxUnitTestsDefault"], 84 manifest: "SdkSandboxManagerServiceManifest.xml", 85 test_config: "SdkSandboxManagerServiceTest.xml", 86 static_libs: [ 87 "service-sdksandbox.impl", 88 "services.core", 89 "modules-utils-build", 90 "sdk_sandbox_flags_lib", 91 ], 92 data: [ 93 ":SampleCodeProviderApp", 94 ":SampleApp", 95 ":CodeProviderWithResources", 96 ":CtsSdkProviderAppWithoutSdkProviderClassNameProperty", 97 ], 98 java_resources: [ 99 "verification/corrupt_allowlist.binarypb", 100 ], 101} 102 103android_test { 104 name: "SdkSandboxFrameworkUnitTests", 105 srcs: [ 106 "src/android/app/sdksandbox/**/*.java", 107 ":framework-sdksandbox-sources", 108 ], 109 defaults: [ 110 "SdkSandboxUnitTestsDefault", 111 "framework-sdksandbox-jarjar-defaults", 112 ], 113 manifest: "SdkSandboxFrameworkManifest.xml", 114 test_config: "SdkSandboxFrameworkTest.xml", 115 data: [ 116 ":CodeProviderWithResources", 117 ], 118} 119