blob: a9eabc8fc450fac54e26127163cc3a61f35784a6 [file] [log] [blame]
Xiao Ma53ed1ac2019-06-03 15:48:39 +09001//
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 Colittib891b5e2020-02-05 16:48:09 +090017java_defaults {
18 name: "NetworkStackIntegrationTestsJniDefaults",
Xiao Ma53ed1ac2019-06-03 15:48:39 +090019 defaults: ["libnetworkstackutilsjni_deps"],
20 jni_libs: [
21 // For mockito extended
22 "libdexmakerjvmtiagent",
23 "libstaticjvmtiagent",
24 // For NetworkStackUtils included in NetworkStackBase
25 "libnetworkstackutilsjni",
26 ],
Lorenzo Colittib891b5e2020-02-05 16:48:09 +090027 visibility: ["//visibility:private"],
28}
29
Remi NGUYEN VAN2a738922019-10-28 17:04:55 +090030java_defaults {
31 name: "NetworkStackIntegrationTestsDefaults",
Lorenzo Colittib891b5e2020-02-05 16:48:09 +090032 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 Colittib891b5e2020-02-05 16:48:09 +090039 ],
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 VAN2a738922019-10-28 17:04:55 +090049android_library {
50 name: "NetworkStackIntegrationTestsLib",
51 defaults: ["NetworkStackIntegrationTestsDefaults"],
52 min_sdk_version: "29",
53 static_libs: [
54 "NetworkStackApiStableLib",
55 ],
56}
57
Lorenzo Colittib891b5e2020-02-05 16:48:09 +090058// Network stack integration tests.
59android_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 VAN2a738922019-10-28 17:04:55 +090069// Network stack next integration tests.
70android_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 Colittib891b5e2020-02-05 16:48:09 +090084// 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.
86android_test {
87 name: "NetworkStackCoverageTests",
88 certificate: "networkstack",
89 platform_apis: true,
90 min_sdk_version: "29",
91 test_suites: ["device-tests", "mts"],
Remi NGUYEN VANba364832020-02-06 13:40:33 +090092 test_config: "AndroidTest_Coverage.xml",
Lorenzo Colittib891b5e2020-02-05 16:48:09 +090093 defaults: ["NetworkStackIntegrationTestsJniDefaults"],
94 static_libs: ["NetworkStackTestsLib", "NetworkStackIntegrationTestsLib"],
95 compile_multilib: "both",
96 manifest: "AndroidManifest_coverage.xml",
Xiao Ma53ed1ac2019-06-03 15:48:39 +090097}