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_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19java_test_host { 20 name: "SdkSandboxLifecycleHostTest", 21 srcs: [ 22 "src/**/SdkSandboxLifecycleHostTest.java", 23 ":CtsHostsideTestsAppSecurityUtil", 24 ], 25 test_config: "SdkSandboxLifecycleHostTest.xml", 26 libs: ["tradefed"], 27 test_suites: ["general-tests"], 28 static_libs: [ 29 "cts-install-lib-host", 30 "modules-utils-build-testing", 31 "SdkSandboxHostTestUtils", 32 ], 33 data: [ 34 ":TestCodeProvider", 35 ":TestCodeProvider2", 36 ":SdkSandboxTestApp", 37 ":SdkSandboxTestApp2", 38 ":SdkSandboxTestSharedApp1", 39 ":SdkSandboxTestSharedApp2", 40 ], 41 compile_multilib: "both", 42} 43 44java_test_host { 45 name: "SdkSandboxShellHostTest", 46 srcs: ["src/**/SdkSandboxShellHostTest.java"], 47 test_config: "SdkSandboxShellHostTest.xml", 48 libs: ["tradefed"], 49 test_suites: ["general-tests"], 50 data: [ 51 ":TestCodeProvider", 52 ":TestCodeProvider2", 53 ":SdkSandboxTestApp", 54 ":SdkSandboxTestDebuggableApp" 55 ], 56} 57 58android_test_helper_app { 59 name: "SdkSandboxTestApp", 60 manifest: "app/SdkSandboxTestAppManifest.xml", 61 defaults: ["platform_app_defaults"], 62 platform_apis: true, 63 srcs: [ 64 "app/src/**/SdkSandboxEmptyActivity.java", 65 "app/src/**/SdkSandboxTestActivity.java", 66 ], 67 static_libs: [ 68 "androidx.core_core", 69 "androidx.test.ext.junit", 70 "SdkSandboxTestUtils", 71 "SdkSandbox-java-lib", 72 ], 73 min_sdk_version: "33", 74 target_sdk_version: "33", 75} 76 77android_test_helper_app { 78 name: "SdkSandboxTestApp2", 79 manifest: "app/SdkSandboxTestApp2Manifest.xml", 80 defaults: ["platform_app_defaults"], 81 platform_apis: true, 82 srcs: [ 83 "app/src/**/SdkSandboxEmptyActivity.java", 84 "app/src/**/SdkSandboxTestActivity2.java", 85 ], 86 static_libs: [ 87 "androidx.core_core", 88 "SdkSandboxTestUtils", 89 "SdkSandbox-java-lib", 90 ], 91 min_sdk_version: "33", 92 target_sdk_version: "33", 93} 94 95android_test_helper_app { 96 name: "SdkSandboxTestDebuggableApp", 97 manifest: "app/SdkSandboxTestDebuggableAppManifest.xml", 98 defaults: ["platform_app_defaults"], 99 platform_apis: true, 100 srcs: [ 101 "app/src/**/SdkSandboxTestDebuggableActivity.java", 102 ], 103 static_libs: [ 104 "androidx.core_core", 105 "SdkSandboxTestUtils", 106 "SdkSandbox-java-lib", 107 ], 108 min_sdk_version: "33", 109 target_sdk_version: "33", 110} 111 112android_test_helper_app { 113 name: "SdkSandboxTestSharedApp1", 114 manifest: "app/SdkSandboxTestSharedApp1Manifest.xml", 115 srcs: [ 116 "app/src/**/SdkSandboxTestSharedActivity.java", 117 ":framework-sdksandbox-sources", 118 ":sdksandbox_aidl", 119 ":sdksandbox-sources", 120 ], 121 defaults: ["framework-sdksandbox-jarjar-defaults"], 122 test_suites: ["general-tests"], 123 static_libs: [ 124 "androidx.core_core", 125 "compatibility-device-util-axt", 126 "SdkSandboxTestUtils", 127 ], 128 platform_apis: true, 129 min_sdk_version: "33", 130 target_sdk_version: "33", 131} 132 133android_test_helper_app { 134 name: "SdkSandboxTestSharedApp2", 135 manifest: "app/SdkSandboxTestSharedApp2Manifest.xml", 136 srcs: [ 137 "app/src/**/SdkSandboxTestSharedApp2.java", 138 "app/src/**/shared/app2/SdkSandboxEmptyActivity.java", 139 ":framework-sdksandbox-sources", 140 ":sdksandbox_aidl", 141 ":sdksandbox-sources", 142 ], 143 defaults: ["framework-sdksandbox-jarjar-defaults"], 144 test_suites: ["general-tests"], 145 static_libs: [ 146 "androidx.core_core", 147 "androidx.test.ext.junit", 148 "compatibility-device-util-axt", 149 "SdkSandboxTestUtils", 150 ], 151 platform_apis: true, 152 min_sdk_version: "33", 153 target_sdk_version: "33", 154} 155 156android_test_helper_app { 157 name: "TestCodeProvider", 158 manifest: "codeprovider/TestCodeProviderManifest.xml", 159 defaults: ["platform_app_defaults"], 160 certificate: ":sdksandbox-test", 161 srcs: [ 162 "codeprovider/src/**/TestSandboxedSdkProvider.java", 163 ], 164 libs: [ 165 "framework-sdksandbox.impl", 166 ], 167 platform_apis: true, 168 min_sdk_version: "33", 169 target_sdk_version: "33", 170} 171 172android_test_helper_app { 173 name: "TestCodeProvider2", 174 manifest: "codeprovider/TestCodeProvider2Manifest.xml", 175 certificate: ":sdksandbox-test", 176 defaults: ["platform_app_defaults"], 177 srcs: [ 178 "codeprovider/src/**/TestSandboxedSdkProvider2.java", 179 ], 180 libs: [ 181 "framework-sdksandbox.impl", 182 ], 183 platform_apis: true, 184 min_sdk_version: "33", 185 target_sdk_version: "33", 186} 187