blob: ff918cc19898c441e369862d64d81fdd4fe87115 [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 {
17 // See: http://go/android-license-faq
18 // A large-scale-change added 'default_applicable_licenses' to import
19 // all of the 'license_kinds' from "system_netd_license"
20 // to get the below license kinds:
21 // SPDX-license-identifier-Apache-2.0
22 default_applicable_licenses: ["system_netd_license"],
23}
24
Bernie Innocenti37ceb532018-06-11 21:10:44 +090025cc_test_library {
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090026 name: "libnetd_test_tun_interface",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090027 defaults: ["netd_defaults"],
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090028 srcs: [
29 "tun_interface.cpp"
30 ],
Lorenzo Colitti54520a02018-02-09 18:39:16 +090031 export_include_dirs: ["."],
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090032 shared_libs: [
33 "libbase",
34 "libnetutils",
35 ],
36}
37
Luke Huang528af602018-08-29 19:06:05 +080038cc_test_library {
39 name: "libnetd_test_unsol_service",
Ken Chenfbc85062022-04-20 15:10:31 +080040 defaults: [
41 "netd_aidl_interface_lateststable_cpp_shared",
42 "netd_defaults",
43 ],
Luke Huang528af602018-08-29 19:06:05 +080044 srcs: [
45 "TestUnsolService.cpp"
46 ],
47 include_dirs: [
48 "system/netd/include",
49 ],
50 shared_libs: [
51 "libbase",
52 "libbinder",
53 "libcutils",
54 "liblog",
55 "libnetutils",
56 "libsysutils",
57 "libutils",
Luke Huang528af602018-08-29 19:06:05 +080058 ],
59}
60
Lorenzo Colitti758bccc2019-06-26 22:12:35 +090061cc_test_library {
62 name: "libnetd_test_utils",
63 srcs: [
64 "test_utils.cpp"
65 ],
66 export_include_dirs: ["."],
67 shared_libs: [
68 "libbase",
69 ],
70}
71
Bernie Innocenti37ceb532018-06-11 21:10:44 +090072cc_test {
73 name: "netd_integration_test",
nelsonli2ca75fe2020-02-11 17:23:03 +080074 test_suites: [
75 "device-tests",
Dan Shi4d3400d2020-04-06 15:59:09 -070076 "vts"
nelsonli2ca75fe2020-02-11 17:23:03 +080077 ],
Bernie Innocenti83a67ca2019-06-19 16:28:05 +090078 require_root: true,
Ken Chenfbc85062022-04-20 15:10:31 +080079 defaults: [
80 "netd_aidl_interface_lateststable_cpp_static",
81 "netd_defaults",
82 ],
Lorenzo Colitti5131b772019-06-26 21:30:59 +090083 tidy: false, // cuts test build time by almost 1 minute
Bernie Innocenti37ceb532018-06-11 21:10:44 +090084 srcs: [
85 ":netd_integration_test_shared",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090086 "binder_test.cpp",
87 "bpf_base_test.cpp",
Patrick Rohrbdafd742022-02-23 19:29:52 +010088 "kernel_test.cpp",
Luke Huang86983202020-06-16 19:14:05 +080089 "netd_client_test.cpp",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090090 "netd_test.cpp",
91 ],
Ken Chenc68c2de2018-11-13 21:51:13 +080092 include_dirs: ["system/netd/server"],
Ken Chenc92fd632021-10-23 11:45:50 +080093 header_libs: ["bpf_connectivity_headers"],
Bernie Innocenti37ceb532018-06-11 21:10:44 +090094 shared_libs: [
95 "libbase",
96 "libbinder",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090097 "libcrypto",
98 "libcutils",
99 "liblog",
100 "libnetd_client",
101 "libnetutils",
Suren Baghdasaryane072a3c2019-01-16 14:36:07 -0800102 "libprocessgroup",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900103 "libssl",
Elliott Hughesbf458132020-09-16 18:26:41 -0700104 "libsysutils",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900105 "libutils",
Patrick Rohrbdafd742022-02-23 19:29:52 +0100106 "libvintf",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900107 ],
108 static_libs: [
Chenbo Feng66165472018-07-23 19:05:56 -0700109 "libcap",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900110 "libnetd_test_tun_interface",
Luke Huang528af602018-08-29 19:06:05 +0800111 "libnetd_test_unsol_service",
Lorenzo Colitti758bccc2019-06-26 22:12:35 +0900112 "libnetd_test_utils",
Bernie Innocenti98951792018-06-26 17:13:44 +0900113 "libnetdutils",
Ken Chencf082a32022-01-15 10:58:55 +0800114 "libnettestutils",
Patrick Rohrb791bd62022-03-29 21:18:31 +0200115 "libtcutils",
paulhu72742952022-02-09 21:24:09 +0800116 "mdns_aidl_interface-V1-cpp",
Jeongik Cha5f72c8f2021-01-26 22:35:13 +0900117 "netd_event_listener_interface-V1-cpp",
Luke Huang0e5e69d2019-03-06 15:42:38 +0800118 "oemnetd_aidl_interface-cpp",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900119 ],
120 compile_multilib: "both",
121 multilib: {
122 lib32: {
123 suffix: "32",
124 },
125 lib64: {
126 suffix: "64",
127 },
128 },
Bernie Innocenti4eb6ecf2018-10-02 19:15:35 +0900129 sanitize: {
Maciej Żenczykowski85a0e3e2021-01-15 23:00:47 -0800130 address: false,
Bernie Innocenti4eb6ecf2018-10-02 19:15:35 +0900131 recover: [ "all" ],
132 },
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900133}