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