blob: e924d3aff3814128c984881c855f254b5c57341f [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 ],
Colin Cross28b0b362020-05-06 17:53:18 -070027 jni_uses_sdk_apis: true,
Lorenzo Colittib891b5e2020-02-05 16:48:09 +090028 visibility: ["//visibility:private"],
29}
30
Remi NGUYEN VAN2a738922019-10-28 17:04:55 +090031java_defaults {
32 name: "NetworkStackIntegrationTestsDefaults",
Lorenzo Colittib891b5e2020-02-05 16:48:09 +090033 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 Colittib891b5e2020-02-05 16:48:09 +090040 ],
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 VAN2a738922019-10-28 17:04:55 +090050android_library {
51 name: "NetworkStackIntegrationTestsLib",
52 defaults: ["NetworkStackIntegrationTestsDefaults"],
53 min_sdk_version: "29",
54 static_libs: [
55 "NetworkStackApiStableLib",
56 ],
57}
58
Lorenzo Colittib891b5e2020-02-05 16:48:09 +090059// Network stack integration tests.
60android_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 VAN2a738922019-10-28 17:04:55 +090070// Network stack next integration tests.
71android_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 Colittib891b5e2020-02-05 16:48:09 +090085// 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.
87android_test {
88 name: "NetworkStackCoverageTests",
89 certificate: "networkstack",
90 platform_apis: true,
91 min_sdk_version: "29",
92 test_suites: ["device-tests", "mts"],
Remi NGUYEN VANba364832020-02-06 13:40:33 +090093 test_config: "AndroidTest_Coverage.xml",
Lorenzo Colittib891b5e2020-02-05 16:48:09 +090094 defaults: ["NetworkStackIntegrationTestsJniDefaults"],
95 static_libs: ["NetworkStackTestsLib", "NetworkStackIntegrationTestsLib"],
96 compile_multilib: "both",
97 manifest: "AndroidManifest_coverage.xml",
Xiao Ma53ed1ac2019-06-03 15:48:39 +090098}