blob: 3baaa18403a39b537e21dc10316f74bba4e22454 [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
Bernie Innocenti37ceb532018-06-11 21:10:44 +090016cc_test_library {
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090017 name: "libnetd_test_tun_interface",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090018 defaults: ["netd_defaults"],
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090019 srcs: [
20 "tun_interface.cpp"
21 ],
Lorenzo Colitti54520a02018-02-09 18:39:16 +090022 export_include_dirs: ["."],
Lorenzo Colitti6e19ec42018-02-07 16:30:03 +090023 shared_libs: [
24 "libbase",
25 "libnetutils",
26 ],
27}
28
Luke Huang528af602018-08-29 19:06:05 +080029cc_test_library {
30 name: "libnetd_test_unsol_service",
31 defaults: ["netd_defaults"],
32 srcs: [
33 "TestUnsolService.cpp"
34 ],
35 include_dirs: [
36 "system/netd/include",
37 ],
38 shared_libs: [
39 "libbase",
40 "libbinder",
41 "libcutils",
42 "liblog",
43 "libnetutils",
44 "libsysutils",
45 "libutils",
46 "netd_aidl_interface-cpp",
47 ],
48}
49
Lorenzo Colitti758bccc2019-06-26 22:12:35 +090050cc_test_library {
51 name: "libnetd_test_utils",
52 srcs: [
53 "test_utils.cpp"
54 ],
55 export_include_dirs: ["."],
56 shared_libs: [
57 "libbase",
58 ],
59}
60
Bernie Innocenti37ceb532018-06-11 21:10:44 +090061cc_test {
62 name: "netd_integration_test",
nelsonli2ca75fe2020-02-11 17:23:03 +080063 test_suites: [
64 "device-tests",
Dan Shi4d3400d2020-04-06 15:59:09 -070065 "vts"
nelsonli2ca75fe2020-02-11 17:23:03 +080066 ],
Bernie Innocenti83a67ca2019-06-19 16:28:05 +090067 require_root: true,
Bernie Innocenti37ceb532018-06-11 21:10:44 +090068 defaults: ["netd_defaults"],
Lorenzo Colitti5131b772019-06-26 21:30:59 +090069 tidy: false, // cuts test build time by almost 1 minute
Bernie Innocenti37ceb532018-06-11 21:10:44 +090070 srcs: [
71 ":netd_integration_test_shared",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090072 "binder_test.cpp",
73 "bpf_base_test.cpp",
Luke Huang86983202020-06-16 19:14:05 +080074 "netd_client_test.cpp",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090075 "netd_test.cpp",
Chenbo Feng49586642018-08-30 18:01:53 -070076 "netlink_listener_test.cpp",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090077 ],
Ken Chenc68c2de2018-11-13 21:51:13 +080078 include_dirs: ["system/netd/server"],
Bernie Innocenti37ceb532018-06-11 21:10:44 +090079 shared_libs: [
80 "libbase",
81 "libbinder",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090082 "libcrypto",
83 "libcutils",
84 "liblog",
85 "libnetd_client",
86 "libnetutils",
Suren Baghdasaryane072a3c2019-01-16 14:36:07 -080087 "libprocessgroup",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090088 "libssl",
89 "libutils",
90 ],
91 static_libs: [
Chenbo Feng66165472018-07-23 19:05:56 -070092 "libcap",
Bernie Innocenti37ceb532018-06-11 21:10:44 +090093 "libnetd_test_tun_interface",
Luke Huang528af602018-08-29 19:06:05 +080094 "libnetd_test_unsol_service",
Lorenzo Colitti758bccc2019-06-26 22:12:35 +090095 "libnetd_test_utils",
Chenbo Fenga54aaf52018-11-07 17:51:51 -080096 "libbpf_android",
Chenbo Fengd6104d12018-10-16 20:29:29 -070097 "libnetdbpf",
Bernie Innocenti98951792018-06-26 17:13:44 +090098 "libnetdutils",
Hsin-Yi Chen4d411692019-06-11 16:46:25 +080099 "libqtaguid",
Jeongik Chab54ecec2019-10-15 17:06:59 +0900100 "netd_aidl_interface-unstable-cpp",
Lorenzo Colitti57bca9f2018-12-11 13:02:05 +0900101 "netd_event_listener_interface-cpp",
Luke Huang0e5e69d2019-03-06 15:42:38 +0800102 "oemnetd_aidl_interface-cpp",
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900103 ],
104 compile_multilib: "both",
105 multilib: {
106 lib32: {
107 suffix: "32",
108 },
109 lib64: {
110 suffix: "64",
111 },
112 },
Bernie Innocenti4eb6ecf2018-10-02 19:15:35 +0900113 sanitize: {
114 address: true,
115 recover: [ "all" ],
116 },
Bernie Innocenti37ceb532018-06-11 21:10:44 +0900117}