blob: 12919ae60f5f0d7c9a94429b86ed408e49430129 [file] [log] [blame]
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +00001//
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
17package {
18 // See: http://go/android-license-faq
Baligh Uddin2afd0982021-05-24 03:50:01 +000019 default_applicable_licenses: ["Android-Apache-2.0"],
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000020}
21
22android_test {
23 name: "FrameworksNetIntegrationTests",
Remi NGUYEN VAN02eee9a2023-01-30 19:19:48 +090024 defaults: [
25 "framework-connectivity-internal-test-defaults",
26 "NetworkStackApiShimSettingsForCurrentBranch",
27 ],
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000028 platform_apis: true,
29 certificate: "platform",
30 srcs: [
31 "src/**/*.kt",
32 "src/**/*.aidl",
33 ],
34 libs: [
35 "android.test.mock",
Remi NGUYEN VAN0a37e722021-08-04 19:19:49 +090036 "ServiceConnectivityResources",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000037 ],
38 static_libs: [
Remi NGUYEN VAN02eee9a2023-01-30 19:19:48 +090039 // It does not matter if NetworkStackApiStableLib or NetworkStackApiCurrentLib is used here,
40 // since the shims for the branch are already included via
41 // NetworkStackApiShimSettingsForCurrentBranch, and will be used in priority as they are
42 // first in the classpath.
43 // If the wrong shims are used for some reason, tests that use newer APIs fail.
44 // TODO: have NetworkStackApiStableLib link dynamically against the shims to remove this
45 // order-dependent setup.
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000046 "NetworkStackApiStableLib",
47 "androidx.test.ext.junit",
48 "frameworks-net-integration-testutils",
49 "kotlin-reflect",
50 "mockito-target-extended-minus-junit4",
51 "net-tests-utils",
Remi NGUYEN VANb240e2a2021-07-12 23:40:56 +000052 "service-connectivity-pre-jarjar",
Lorenzo Colitti3d521722022-02-04 01:39:01 +090053 "service-connectivity-tiramisu-pre-jarjar",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000054 "services.net",
55 "testables",
56 ],
57 test_suites: ["device-tests"],
58 use_embedded_native_libs: true,
59 jni_libs: [
60 // For mockito extended
61 "libdexmakerjvmtiagent",
62 "libstaticjvmtiagent",
63 // android_library does not include JNI libs: include NetworkStack dependencies here
64 "libnativehelper_compat_libc++",
65 "libnetworkstackutilsjni",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090066 "libandroid_net_connectivity_com_android_net_module_util_jni",
Patrick Rohrd8174362022-02-01 12:32:43 +010067 "libservice-connectivity",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000068 ],
Remi NGUYEN VANb240e2a2021-07-12 23:40:56 +000069 jarjar_rules: ":connectivity-jarjar-rules",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000070}
71
72// Utilities for testing framework code both in integration and unit tests.
73java_library {
74 name: "frameworks-net-integration-testutils",
75 defaults: ["framework-connectivity-test-defaults"],
76 srcs: ["util/**/*.java", "util/**/*.kt"],
77 static_libs: [
78 "androidx.annotation_annotation",
79 "androidx.test.rules",
80 "junit",
81 "net-tests-utils",
82 ],
83 libs: [
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +090084 "service-connectivity-pre-jarjar",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000085 "services.core",
86 "services.net",
87 ],
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +090088 visibility: [
89 "//packages/modules/Connectivity/tests/integration",
90 "//packages/modules/Connectivity/tests/unit",
91 ],
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000092}