blob: 349529ddb0fdec61fafc1b23251ffaedc8412a6a [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 {
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000018 default_team: "trendy_team_fwk_core_networking",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000019 // See: http://go/android-license-faq
Baligh Uddin2afd0982021-05-24 03:50:01 +000020 default_applicable_licenses: ["Android-Apache-2.0"],
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000021}
22
23android_test {
24 name: "FrameworksNetIntegrationTests",
Remi NGUYEN VAN02eee9a2023-01-30 19:19:48 +090025 defaults: [
26 "framework-connectivity-internal-test-defaults",
27 "NetworkStackApiShimSettingsForCurrentBranch",
28 ],
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000029 platform_apis: true,
30 certificate: "platform",
31 srcs: [
32 "src/**/*.kt",
33 "src/**/*.aidl",
34 ],
35 libs: [
36 "android.test.mock",
Remi NGUYEN VAN0a37e722021-08-04 19:19:49 +090037 "ServiceConnectivityResources",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000038 ],
39 static_libs: [
Remi NGUYEN VAN02eee9a2023-01-30 19:19:48 +090040 // It does not matter if NetworkStackApiStableLib or NetworkStackApiCurrentLib is used here,
41 // since the shims for the branch are already included via
42 // NetworkStackApiShimSettingsForCurrentBranch, and will be used in priority as they are
43 // first in the classpath.
44 // If the wrong shims are used for some reason, tests that use newer APIs fail.
45 // TODO: have NetworkStackApiStableLib link dynamically against the shims to remove this
46 // order-dependent setup.
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000047 "NetworkStackApiStableLib",
48 "androidx.test.ext.junit",
Junyu Lai54e84ab2023-10-23 13:36:26 +080049 "compatibility-device-util-axt",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000050 "frameworks-net-integration-testutils",
51 "kotlin-reflect",
52 "mockito-target-extended-minus-junit4",
53 "net-tests-utils",
Remi NGUYEN VANb240e2a2021-07-12 23:40:56 +000054 "service-connectivity-pre-jarjar",
Lorenzo Colitti3d521722022-02-04 01:39:01 +090055 "service-connectivity-tiramisu-pre-jarjar",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000056 "services.net",
57 "testables",
58 ],
59 test_suites: ["device-tests"],
60 use_embedded_native_libs: true,
61 jni_libs: [
62 // For mockito extended
63 "libdexmakerjvmtiagent",
64 "libstaticjvmtiagent",
65 // android_library does not include JNI libs: include NetworkStack dependencies here
66 "libnativehelper_compat_libc++",
67 "libnetworkstackutilsjni",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090068 "libandroid_net_connectivity_com_android_net_module_util_jni",
Patrick Rohrd8174362022-02-01 12:32:43 +010069 "libservice-connectivity",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000070 ],
Remi NGUYEN VANb240e2a2021-07-12 23:40:56 +000071 jarjar_rules: ":connectivity-jarjar-rules",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000072}
73
74// Utilities for testing framework code both in integration and unit tests.
75java_library {
76 name: "frameworks-net-integration-testutils",
77 defaults: ["framework-connectivity-test-defaults"],
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000078 srcs: [
79 "util/**/*.java",
80 "util/**/*.kt",
81 ],
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000082 static_libs: [
83 "androidx.annotation_annotation",
84 "androidx.test.rules",
85 "junit",
86 "net-tests-utils",
87 ],
88 libs: [
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +090089 "service-connectivity-pre-jarjar",
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000090 "services.core",
91 "services.net",
92 ],
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +090093 visibility: [
94 "//packages/modules/Connectivity/tests/integration",
95 "//packages/modules/Connectivity/tests/unit",
96 ],
Remi NGUYEN VAN678277c2021-05-11 13:37:06 +000097}