1// 2// Copyright (C) 2020 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// 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20java_defaults { 21 name: "TetheringIntegrationTestsDefaults", 22 srcs: [ 23 "src/**/*.java", 24 "src/**/*.kt", 25 ], 26 min_sdk_version: "30", 27 static_libs: [ 28 "NetworkStackApiStableLib", 29 "androidx.test.rules", 30 "mockito-target-extended-minus-junit4", 31 "net-tests-utils", 32 "testables", 33 ], 34 libs: [ 35 "android.test.runner", 36 "android.test.base", 37 "android.test.mock", 38 ], 39 jni_libs: [ 40 // For mockito extended 41 "libdexmakerjvmtiagent", 42 "libstaticjvmtiagent", 43 ], 44 jarjar_rules: ":NetworkStackJarJarRules", 45} 46 47android_library { 48 name: "TetheringIntegrationTestsLatestSdkLib", 49 target_sdk_version: "30", 50 platform_apis: true, 51 defaults: ["TetheringIntegrationTestsDefaults"], 52 visibility: [ 53 "//packages/modules/Connectivity/tests/cts/tethering", 54 "//packages/modules/Connectivity/tests:__subpackages__", 55 "//packages/modules/Connectivity/Tethering/tests:__subpackages__", 56 ] 57} 58 59android_library { 60 name: "TetheringIntegrationTestsLib", 61 target_sdk_version: "current", 62 platform_apis: true, 63 defaults: ["TetheringIntegrationTestsDefaults"], 64 visibility: [ 65 "//packages/modules/Connectivity/tests/cts/tethering", 66 "//packages/modules/Connectivity/Tethering/tests/mts", 67 ] 68} 69 70android_test { 71 name: "TetheringIntegrationTests", 72 platform_apis: true, 73 defaults: ["TetheringIntegrationTestsDefaults"], 74 test_suites: [ 75 "device-tests", 76 "mts", 77 ], 78 compile_multilib: "both", 79} 80 81android_library { 82 name: "TetheringCoverageTestsLib", 83 min_sdk_version: "30", 84 static_libs: [ 85 "NetdStaticLibTestsLib", 86 "NetworkStaticLibTestsLib", 87 "NetworkStackTestsLib", 88 "TetheringTestsLatestSdkLib", 89 "TetheringIntegrationTestsLatestSdkLib", 90 ], 91 jarjar_rules: ":TetheringTestsJarJarRules", 92 manifest: "AndroidManifest_coverage.xml", 93 visibility: [ 94 "//packages/modules/Connectivity/tests:__subpackages__" 95 ], 96} 97 98// Special version of the tethering tests that includes all tests necessary for code coverage 99// purposes. This is currently the union of TetheringTests, TetheringIntegrationTests and 100// NetworkStackTests. 101// TODO: remove in favor of ConnectivityCoverageTests, which includes below tests and more 102android_test { 103 name: "TetheringCoverageTests", 104 platform_apis: true, 105 min_sdk_version: "30", 106 target_sdk_version: "30", 107 test_suites: ["device-tests", "mts"], 108 test_config: "AndroidTest_Coverage.xml", 109 defaults: ["libnetworkstackutilsjni_deps"], 110 static_libs: [ 111 "modules-utils-native-coverage-listener", 112 "TetheringCoverageTestsLib", 113 ], 114 jni_libs: [ 115 // For mockito extended 116 "libdexmakerjvmtiagent", 117 "libstaticjvmtiagent", 118 // For NetworkStackUtils included in NetworkStackBase 119 "libnetworkstackutilsjni", 120 "libtetherutilsjni", 121 ], 122 compile_multilib: "both", 123 manifest: "AndroidManifest_coverage.xml", 124} 125