1// 2// Copyright (C) 2019 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17// Tests in this folder are included both in unit tests and CTS. 18package { 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22java_library { 23 name: "TetheringCommonTests", 24 srcs: [ 25 "common/**/*.java", 26 "common/**/*.kt" 27 ], 28 static_libs: [ 29 "androidx.test.rules", 30 "net-tests-utils", 31 ], 32 // TODO(b/147200698) change sdk_version to module-current and remove framework-minus-apex 33 sdk_version: "core_platform", 34 libs: [ 35 "framework-minus-apex", 36 "framework-connectivity.impl", 37 "framework-connectivity-t.impl", 38 "framework-tethering.impl", 39 ], 40 visibility: [ 41 "//packages/modules/Connectivity/tests/cts/tethering", 42 ], 43} 44 45java_defaults { 46 name: "TetheringTestsDefaults", 47 min_sdk_version: "30", 48 srcs: [ 49 "src/**/*.java", 50 "src/**/*.kt", 51 ], 52 static_libs: [ 53 "TetheringCommonTests", 54 "androidx.test.rules", 55 "frameworks-base-testutils", 56 "mockito-target-extended-minus-junit4", 57 "net-tests-utils", 58 "testables", 59 ], 60 // TODO(b/147200698) change sdk_version to module-current and 61 // remove framework-minus-apex, ext, and framework-res 62 sdk_version: "core_platform", 63 libs: [ 64 "android.test.runner", 65 "android.test.base", 66 "android.test.mock", 67 "ext", 68 "framework-minus-apex", 69 "framework-res", 70 "framework-bluetooth.stubs.module_lib", 71 "framework-configinfrastructure.stubs.module_lib", 72 "framework-connectivity.impl", 73 "framework-connectivity-t.impl", 74 "framework-tethering.impl", 75 "framework-wifi.stubs.module_lib", 76 ], 77 jni_libs: [ 78 // For mockito extended 79 "libdexmakerjvmtiagent", 80 "libstaticjvmtiagent", 81 "libcom_android_networkstack_tethering_util_jni", 82 ], 83} 84 85// Library containing the unit tests. This is used by the coverage test target to pull in the 86// unit test code. It is not currently used by the tests themselves because all the build 87// configuration needed by the tests is in the TetheringTestsDefaults rule. 88android_library { 89 name: "TetheringTestsLatestSdkLib", 90 defaults: ["TetheringTestsDefaults"], 91 static_libs: [ 92 "TetheringApiStableLib", 93 ], 94 target_sdk_version: "33", 95 visibility: [ 96 "//packages/modules/Connectivity/tests:__subpackages__", 97 "//packages/modules/Connectivity/Tethering/tests:__subpackages__", 98 ] 99} 100 101android_test { 102 name: "TetheringTests", 103 platform_apis: true, 104 test_suites: [ 105 "device-tests", 106 "mts-tethering", 107 ], 108 defaults: [ 109 "TetheringTestsDefaults", 110 "ConnectivityNextEnableDefaults", 111 ], 112 static_libs: [ 113 "TetheringApiCurrentLib", 114 ], 115 compile_multilib: "both", 116 jarjar_rules: ":TetheringTestsJarJarRules", 117} 118