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 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21java_defaults { 22 name: "NetworkStackIntegrationTestsJniDefaults", 23 defaults: ["libnetworkstackutilsjni_deps"], 24 jni_libs: [ 25 // For mockito extended 26 "libdexmakerjvmtiagent", 27 "libstaticjvmtiagent", 28 // For NetworkStackUtils included in NetworkStackBase 29 "libnetworkstackutilsjni", 30 ], 31 jni_uses_sdk_apis: true, 32 visibility: ["//visibility:private"], 33} 34 35java_defaults { 36 name: "NetworkStackIntegrationTestsDefaults", 37 defaults: ["framework-connectivity-test-defaults"], 38 srcs: [ 39 "src/**/*.java", 40 "src/**/*.kt", 41 ], 42 static_libs: [ 43 "androidx.annotation_annotation", 44 "androidx.test.rules", 45 "mockito-target-extended-minus-junit4", 46 "net-tests-utils", 47 "testables", 48 ], 49 libs: [ 50 "android.test.runner", 51 "android.test.base", 52 "android.test.mock", 53 ], 54 visibility: ["//visibility:private"], 55} 56 57android_library { 58 name: "NetworkStackIntegrationTestsLib", 59 defaults: ["NetworkStackIntegrationTestsDefaults"], 60 min_sdk_version: "29", 61 static_libs: [ 62 "NetworkStackApiStableLib", 63 ], 64} 65 66// Network stack integration tests. 67android_test { 68 name: "NetworkStackIntegrationTests", 69 defaults: ["NetworkStackIntegrationTestsJniDefaults"], 70 static_libs: ["NetworkStackIntegrationTestsLib"], 71 certificate: "networkstack", 72 platform_apis: true, 73 test_suites: ["device-tests"], 74 min_sdk_version: "29", 75 target_sdk_version: "30", 76 jarjar_rules: ":NetworkStackJarJarRules", 77} 78 79// Network stack next integration tests. 80android_test { 81 name: "NetworkStackNextIntegrationTests", 82 defaults: [ 83 "NetworkStackIntegrationTestsDefaults", 84 "NetworkStackIntegrationTestsJniDefaults", 85 "ConnectivityNextEnableDefaults", 86 ], 87 static_libs: [ 88 "NetworkStackApiCurrentLib", 89 ], 90 certificate: "networkstack", 91 platform_apis: true, 92 test_suites: ["device-tests"], 93 jarjar_rules: ":NetworkStackJarJarRules", 94} 95 96// Special version of the network stack tests that includes all tests necessary for code coverage 97// purposes. This is currently the union of NetworkStackTests and NetworkStackIntegrationTests. 98android_test { 99 name: "NetworkStackCoverageTests", 100 certificate: "networkstack", 101 platform_apis: true, 102 min_sdk_version: "29", 103 target_sdk_version: "30", 104 test_suites: ["device-tests", "mts"], 105 test_config: "AndroidTest_Coverage.xml", 106 defaults: ["NetworkStackIntegrationTestsJniDefaults"], 107 static_libs: [ 108 "modules-utils-native-coverage-listener", 109 "NetworkStackTestsLib", 110 "NetworkStackIntegrationTestsLib", 111 "NetworkStaticLibTestsLib", 112 "NetdStaticLibTestsLib", 113 ], 114 compile_multilib: "both", 115 manifest: "AndroidManifest_coverage.xml", 116 jarjar_rules: ":NetworkStackJarJarRules", 117} 118