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_team: "trendy_team_fwk_core_networking", 20 default_applicable_licenses: ["Android-Apache-2.0"], 21} 22 23java_library { 24 name: "TetheringCommonTests", 25 srcs: [ 26 "common/**/*.java", 27 "common/**/*.kt", 28 ], 29 static_libs: [ 30 "androidx.test.rules", 31 "net-tests-utils", 32 ], 33 // TODO(b/147200698) change sdk_version to module-current and remove framework-minus-apex 34 sdk_version: "core_platform", 35 libs: [ 36 "framework-minus-apex", 37 "framework-connectivity.impl", 38 "framework-connectivity-t.impl", 39 "framework-tethering.impl", 40 ], 41 visibility: [ 42 "//packages/modules/Connectivity/tests/cts/tethering", 43 ], 44} 45 46java_defaults { 47 name: "TetheringTestsDefaults", 48 min_sdk_version: "30", 49 srcs: [ 50 "src/**/*.java", 51 "src/**/*.kt", 52 ], 53 static_libs: [ 54 "TetheringCommonTests", 55 "androidx.test.rules", 56 "frameworks-base-testutils", 57 "mockito-target-extended-minus-junit4", 58 "net-tests-utils", 59 "testables", 60 ], 61 // TODO(b/147200698) change sdk_version to module-current and 62 // remove framework-minus-apex, ext, and framework-res 63 sdk_version: "core_platform", 64 libs: [ 65 "android.test.runner", 66 "android.test.base", 67 "android.test.mock", 68 "ext", 69 "framework-minus-apex", 70 "framework-res", 71 "framework-bluetooth.stubs.module_lib", 72 "framework-configinfrastructure.stubs.module_lib", 73 "framework-connectivity.impl", 74 "framework-connectivity-t.impl", 75 "framework-tethering.impl", 76 "framework-wifi.stubs.module_lib", 77 ], 78 jni_libs: [ 79 // For mockito extended 80 "libdexmakerjvmtiagent", 81 "libstaticjvmtiagent", 82 "libcom_android_networkstack_tethering_util_jni", 83 ], 84} 85 86// Library containing the unit tests. This is used by the coverage test target to pull in the 87// unit test code. It is not currently used by the tests themselves because all the build 88// configuration needed by the tests is in the TetheringTestsDefaults rule. 89android_library { 90 name: "TetheringTestsLatestSdkLib", 91 defaults: ["TetheringTestsDefaults"], 92 static_libs: [ 93 "TetheringApiStableLib", 94 ], 95 target_sdk_version: "33", 96 visibility: [ 97 "//packages/modules/Connectivity/tests:__subpackages__", 98 "//packages/modules/Connectivity/Tethering/tests:__subpackages__", 99 ], 100} 101 102android_test { 103 name: "TetheringTests", 104 platform_apis: true, 105 test_suites: [ 106 "device-tests", 107 "mts-tethering", 108 ], 109 defaults: [ 110 "TetheringTestsDefaults", 111 "ConnectivityNextEnableDefaults", 112 ], 113 static_libs: [ 114 "TetheringApiCurrentLib", 115 ], 116 compile_multilib: "both", 117 jarjar_rules: ":TetheringTestsJarJarRules", 118} 119