blob: 01806b5c0c694a3a9ca7ccf0a73ca32e0ea32e6a [file] [log] [blame]
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +09001//
2// Copyright (C) 2018 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
Bob Badour4114d1a2021-02-12 15:38:42 -080016package {
Aditya Choudharyf7e2afb2024-01-30 13:47:16 +000017 default_team: "trendy_team_fwk_core_networking",
Bob Badour4114d1a2021-02-12 15:38:42 -080018 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "system_netd_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["system_netd_license"],
24}
25
Bernie Innocenti37ceb532018-06-11 21:10:44 +090026cc_test_library {
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090027 name: "libnetd_test_tun_interface",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090028 defaults: ["netd_defaults"],
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090029 srcs: [
Aditya Choudharyf7e2afb2024-01-30 13:47:16 +000030 "tun_interface.cpp",
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090031 ],
Lorenzo Colitti54520a02018-02-09 18:39:16 +090032 export_include_dirs: ["."],
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090033 shared_libs: [
34 "libbase",
35 "libnetutils",
36 ],
37}
38
Luke Huang528af602018-08-29 19:06:05 +080039cc_test_library {
40 name: "libnetd_test_unsol_service",
Ken Chenb2d88882022-04-20 15:10:31 +080041 defaults: [
42 "netd_aidl_interface_lateststable_cpp_shared",
43 "netd_defaults",
44 ],
Luke Huang528af602018-08-29 19:06:05 +080045 srcs: [
Aditya Choudharyf7e2afb2024-01-30 13:47:16 +000046 "TestUnsolService.cpp",
Luke Huang528af602018-08-29 19:06:05 +080047 ],
48 include_dirs: [
49 "system/netd/include",
50 ],
51 shared_libs: [
52 "libbase",
53 "libbinder",
54 "libcutils",
55 "liblog",
56 "libnetutils",
57 "libsysutils",
58 "libutils",
Luke Huang528af602018-08-29 19:06:05 +080059 ],
60}
61
Lorenzo Colitti758bccc2019-06-26 22:12:35 +090062cc_test_library {
63 name: "libnetd_test_utils",
64 srcs: [
Aditya Choudharyf7e2afb2024-01-30 13:47:16 +000065 "test_utils.cpp",
Lorenzo Colitti758bccc2019-06-26 22:12:35 +090066 ],
67 export_include_dirs: ["."],
68 shared_libs: [
69 "libbase",
Suprabh Shukla995728e2024-02-07 13:22:49 -080070 "libbinder",
71 "libutils",
Lorenzo Colitti758bccc2019-06-26 22:12:35 +090072 ],
73}
74
Bernie Innocenti37ceb532018-06-11 21:10:44 +090075cc_test {
76 name: "netd_integration_test",
nelsonli2ca75fe2020-02-11 17:23:03 +080077 test_suites: [
78 "device-tests",
Aditya Choudharyf7e2afb2024-01-30 13:47:16 +000079 "vts",
nelsonli2ca75fe2020-02-11 17:23:03 +080080 ],
Ken Cheneef52ee2022-05-20 13:46:03 +080081 isolated: false,
Bernie Innocenti83a67ca2019-06-19 16:28:05 +090082 require_root: true,
Ken Chenb2d88882022-04-20 15:10:31 +080083 defaults: [
84 "netd_aidl_interface_lateststable_cpp_static",
85 "netd_defaults",
86 ],
Aditya Choudharyf7e2afb2024-01-30 13:47:16 +000087 tidy: false, // cuts test build time by almost 1 minute
Bernie Innocenti37ceb532018-06-11 21:10:44 +090088 srcs: [
89 ":netd_integration_test_shared",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090090 "binder_test.cpp",
Patrick Rohrbdafd742022-02-23 19:29:52 +010091 "kernel_test.cpp",
Luke Huang86983202020-06-16 19:14:05 +080092 "netd_client_test.cpp",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090093 "netd_test.cpp",
94 ],
Ken Chenc68c2de2018-11-13 21:51:13 +080095 include_dirs: ["system/netd/server"],
Yan Yanf9c46792022-10-13 00:25:43 +000096 header_libs: ["bpf_headers"],
Bernie Innocenti37ceb532018-06-11 21:10:44 +090097 shared_libs: [
98 "libbase",
99 "libbinder",
Lorenzo Colittied1160e2023-05-24 09:52:13 +0900100 "libbinder_ndk",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900101 "libcrypto",
102 "libcutils",
103 "liblog",
104 "libnetd_client",
105 "libnetutils",
Suren Baghdasaryane072a3c2019-01-16 14:36:07 -0800106 "libprocessgroup",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900107 "libssl",
Elliott Hughesbf458132020-09-16 18:26:41 -0700108 "libsysutils",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900109 "libutils",
Patrick Rohrbdafd742022-02-23 19:29:52 +0100110 "libvintf",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900111 ],
112 static_libs: [
Chenbo Feng66165472018-07-23 19:05:56 -0700113 "libcap",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900114 "libnetd_test_tun_interface",
Luke Huang528af602018-08-29 19:06:05 +0800115 "libnetd_test_unsol_service",
Lorenzo Colitti758bccc2019-06-26 22:12:35 +0900116 "libnetd_test_utils",
Bernie Innocenti98951792018-06-26 17:13:44 +0900117 "libnetdutils",
Ken Chencf082a32022-01-15 10:58:55 +0800118 "libnettestutils",
Patrick Rohrb791bd62022-03-29 21:18:31 +0200119 "libtcutils",
Jeongik Cha5f72c8f2021-01-26 22:35:13 +0900120 "netd_event_listener_interface-V1-cpp",
Luke Huang0e5e69d2019-03-06 15:42:38 +0800121 "oemnetd_aidl_interface-cpp",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900122 ],
123 compile_multilib: "both",
124 multilib: {
125 lib32: {
126 suffix: "32",
127 },
128 lib64: {
129 suffix: "64",
130 },
131 },
Bernie Innocenti4eb6ecf2018-10-02 19:15:35 +0900132 sanitize: {
Maciej Żenczykowski85a0e3e2021-01-15 23:00:47 -0800133 address: false,
Aditya Choudharyf7e2afb2024-01-30 13:47:16 +0000134 recover: ["all"],
Bernie Innocenti4eb6ecf2018-10-02 19:15:35 +0900135 },
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900136}