Xiao Ma | 53ed1ac | 2019-06-03 15:48:39 +0900 | [diff] [blame] | 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 | |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame^] | 17 | java_defaults { |
| 18 | name: "NetworkStackIntegrationTestsJniDefaults", |
Xiao Ma | 53ed1ac | 2019-06-03 15:48:39 +0900 | [diff] [blame] | 19 | defaults: ["libnetworkstackutilsjni_deps"], |
| 20 | jni_libs: [ |
| 21 | // For mockito extended |
| 22 | "libdexmakerjvmtiagent", |
| 23 | "libstaticjvmtiagent", |
| 24 | // For NetworkStackUtils included in NetworkStackBase |
| 25 | "libnetworkstackutilsjni", |
| 26 | ], |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame^] | 27 | visibility: ["//visibility:private"], |
| 28 | } |
| 29 | |
| 30 | android_library { |
| 31 | name: "NetworkStackIntegrationTestsLib", |
| 32 | min_sdk_version: "29", |
| 33 | srcs: ["src/**/*.java"], |
| 34 | static_libs: [ |
| 35 | "androidx.annotation_annotation", |
| 36 | "androidx.test.rules", |
| 37 | "mockito-target-extended-minus-junit4", |
| 38 | "net-tests-utils", |
| 39 | "testables", |
| 40 | "NetworkStackApiStableLib", |
| 41 | ], |
| 42 | libs: [ |
| 43 | "android.test.runner", |
| 44 | "android.test.base", |
| 45 | "android.test.mock", |
| 46 | ], |
| 47 | jarjar_rules: ":NetworkStackJarJarRules", |
| 48 | visibility: ["//visibility:private"], |
| 49 | } |
| 50 | |
| 51 | // Network stack integration tests. |
| 52 | android_test { |
| 53 | name: "NetworkStackIntegrationTests", |
| 54 | defaults: ["NetworkStackIntegrationTestsJniDefaults"], |
| 55 | static_libs: ["NetworkStackIntegrationTestsLib"], |
| 56 | certificate: "networkstack", |
| 57 | platform_apis: true, |
| 58 | test_suites: ["device-tests"], |
| 59 | min_sdk_version: "29", |
| 60 | } |
| 61 | |
| 62 | // Special version of the network stack tests that includes all tests necessary for code coverage |
| 63 | // purposes. This is currently the union of NetworkStackTests and NetworkStackIntegrationTests. |
| 64 | android_test { |
| 65 | name: "NetworkStackCoverageTests", |
| 66 | certificate: "networkstack", |
| 67 | platform_apis: true, |
| 68 | min_sdk_version: "29", |
| 69 | test_suites: ["device-tests", "mts"], |
| 70 | defaults: ["NetworkStackIntegrationTestsJniDefaults"], |
| 71 | static_libs: ["NetworkStackTestsLib", "NetworkStackIntegrationTestsLib"], |
| 72 | compile_multilib: "both", |
| 73 | manifest: "AndroidManifest_coverage.xml", |
Xiao Ma | 53ed1ac | 2019-06-03 15:48:39 +0900 | [diff] [blame] | 74 | } |