blob: c4f057b1e1c5a1447d55c2d220ea4b989ccadb04 [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
30android_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.
52android_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.
64android_test {
65 name: "NetworkStackCoverageTests",
66 certificate: "networkstack",
67 platform_apis: true,
68 min_sdk_version: "29",
69 test_suites: ["device-tests", "mts"],
Remi NGUYEN VANba364832020-02-06 13:40:33 +090070 test_config: "AndroidTest_Coverage.xml",
Lorenzo Colittib891b5e2020-02-05 16:48:09 +090071 defaults: ["NetworkStackIntegrationTestsJniDefaults"],
72 static_libs: ["NetworkStackTestsLib", "NetworkStackIntegrationTestsLib"],
73 compile_multilib: "both",
74 manifest: "AndroidManifest_coverage.xml",
Xiao Ma53ed1ac2019-06-03 15:48:39 +090075}