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 | |
Remi NGUYEN VAN | 2a73892 | 2019-10-28 17:04:55 +0900 | [diff] [blame] | 30 | java_defaults { |
| 31 | name: "NetworkStackIntegrationTestsDefaults", |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame] | 32 | srcs: ["src/**/*.java"], |
| 33 | static_libs: [ |
| 34 | "androidx.annotation_annotation", |
| 35 | "androidx.test.rules", |
| 36 | "mockito-target-extended-minus-junit4", |
| 37 | "net-tests-utils", |
| 38 | "testables", |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame] | 39 | ], |
| 40 | libs: [ |
| 41 | "android.test.runner", |
| 42 | "android.test.base", |
| 43 | "android.test.mock", |
| 44 | ], |
| 45 | jarjar_rules: ":NetworkStackJarJarRules", |
| 46 | visibility: ["//visibility:private"], |
| 47 | } |
| 48 | |
Remi NGUYEN VAN | 2a73892 | 2019-10-28 17:04:55 +0900 | [diff] [blame] | 49 | android_library { |
| 50 | name: "NetworkStackIntegrationTestsLib", |
| 51 | defaults: ["NetworkStackIntegrationTestsDefaults"], |
| 52 | min_sdk_version: "29", |
| 53 | static_libs: [ |
| 54 | "NetworkStackApiStableLib", |
| 55 | ], |
| 56 | } |
| 57 | |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame] | 58 | // Network stack integration tests. |
| 59 | android_test { |
| 60 | name: "NetworkStackIntegrationTests", |
| 61 | defaults: ["NetworkStackIntegrationTestsJniDefaults"], |
| 62 | static_libs: ["NetworkStackIntegrationTestsLib"], |
| 63 | certificate: "networkstack", |
| 64 | platform_apis: true, |
| 65 | test_suites: ["device-tests"], |
| 66 | min_sdk_version: "29", |
| 67 | } |
| 68 | |
Remi NGUYEN VAN | 2a73892 | 2019-10-28 17:04:55 +0900 | [diff] [blame] | 69 | // Network stack next integration tests. |
| 70 | android_test { |
| 71 | name: "NetworkStackNextIntegrationTests", |
| 72 | defaults: [ |
| 73 | "NetworkStackIntegrationTestsDefaults", |
| 74 | "NetworkStackIntegrationTestsJniDefaults", |
| 75 | ], |
| 76 | static_libs: [ |
| 77 | "NetworkStackApiCurrentLib", |
| 78 | ], |
| 79 | certificate: "networkstack", |
| 80 | platform_apis: true, |
| 81 | test_suites: ["device-tests"], |
| 82 | } |
| 83 | |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame] | 84 | // Special version of the network stack tests that includes all tests necessary for code coverage |
| 85 | // purposes. This is currently the union of NetworkStackTests and NetworkStackIntegrationTests. |
| 86 | android_test { |
| 87 | name: "NetworkStackCoverageTests", |
| 88 | certificate: "networkstack", |
| 89 | platform_apis: true, |
| 90 | min_sdk_version: "29", |
| 91 | test_suites: ["device-tests", "mts"], |
Remi NGUYEN VAN | ba36483 | 2020-02-06 13:40:33 +0900 | [diff] [blame] | 92 | test_config: "AndroidTest_Coverage.xml", |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame] | 93 | defaults: ["NetworkStackIntegrationTestsJniDefaults"], |
| 94 | static_libs: ["NetworkStackTestsLib", "NetworkStackIntegrationTestsLib"], |
| 95 | compile_multilib: "both", |
| 96 | manifest: "AndroidManifest_coverage.xml", |
Xiao Ma | 53ed1ac | 2019-06-03 15:48:39 +0900 | [diff] [blame] | 97 | } |