Lorenzo Colitti | 6e19ec4 | 2018-02-07 16:30:03 +0900 | [diff] [blame] | 1 | // |
| 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 Badour | 4114d1a | 2021-02-12 15:38:42 -0800 | [diff] [blame] | 16 | package { |
| 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 Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 25 | cc_test_library { |
Lorenzo Colitti | 6e19ec4 | 2018-02-07 16:30:03 +0900 | [diff] [blame] | 26 | name: "libnetd_test_tun_interface", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 27 | defaults: ["netd_defaults"], |
Lorenzo Colitti | 6e19ec4 | 2018-02-07 16:30:03 +0900 | [diff] [blame] | 28 | srcs: [ |
| 29 | "tun_interface.cpp" |
| 30 | ], |
Lorenzo Colitti | 54520a0 | 2018-02-09 18:39:16 +0900 | [diff] [blame] | 31 | export_include_dirs: ["."], |
Lorenzo Colitti | 6e19ec4 | 2018-02-07 16:30:03 +0900 | [diff] [blame] | 32 | shared_libs: [ |
| 33 | "libbase", |
| 34 | "libnetutils", |
| 35 | ], |
| 36 | } |
| 37 | |
Luke Huang | 528af60 | 2018-08-29 19:06:05 +0800 | [diff] [blame] | 38 | cc_test_library { |
| 39 | name: "libnetd_test_unsol_service", |
Ken Chen | fbc8506 | 2022-04-20 15:10:31 +0800 | [diff] [blame] | 40 | defaults: [ |
| 41 | "netd_aidl_interface_lateststable_cpp_shared", |
| 42 | "netd_defaults", |
| 43 | ], |
Luke Huang | 528af60 | 2018-08-29 19:06:05 +0800 | [diff] [blame] | 44 | 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 Huang | 528af60 | 2018-08-29 19:06:05 +0800 | [diff] [blame] | 58 | ], |
| 59 | } |
| 60 | |
Lorenzo Colitti | 758bccc | 2019-06-26 22:12:35 +0900 | [diff] [blame] | 61 | cc_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 Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 72 | cc_test { |
| 73 | name: "netd_integration_test", |
nelsonli | 2ca75fe | 2020-02-11 17:23:03 +0800 | [diff] [blame] | 74 | test_suites: [ |
| 75 | "device-tests", |
Dan Shi | 4d3400d | 2020-04-06 15:59:09 -0700 | [diff] [blame] | 76 | "vts" |
nelsonli | 2ca75fe | 2020-02-11 17:23:03 +0800 | [diff] [blame] | 77 | ], |
Bernie Innocenti | 83a67ca | 2019-06-19 16:28:05 +0900 | [diff] [blame] | 78 | require_root: true, |
Ken Chen | fbc8506 | 2022-04-20 15:10:31 +0800 | [diff] [blame] | 79 | defaults: [ |
| 80 | "netd_aidl_interface_lateststable_cpp_static", |
| 81 | "netd_defaults", |
| 82 | ], |
Lorenzo Colitti | 5131b77 | 2019-06-26 21:30:59 +0900 | [diff] [blame] | 83 | tidy: false, // cuts test build time by almost 1 minute |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 84 | srcs: [ |
| 85 | ":netd_integration_test_shared", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 86 | "binder_test.cpp", |
| 87 | "bpf_base_test.cpp", |
Patrick Rohr | bdafd74 | 2022-02-23 19:29:52 +0100 | [diff] [blame] | 88 | "kernel_test.cpp", |
Luke Huang | 8698320 | 2020-06-16 19:14:05 +0800 | [diff] [blame] | 89 | "netd_client_test.cpp", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 90 | "netd_test.cpp", |
| 91 | ], |
Ken Chen | c68c2de | 2018-11-13 21:51:13 +0800 | [diff] [blame] | 92 | include_dirs: ["system/netd/server"], |
Ken Chen | c92fd63 | 2021-10-23 11:45:50 +0800 | [diff] [blame] | 93 | header_libs: ["bpf_connectivity_headers"], |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 94 | shared_libs: [ |
| 95 | "libbase", |
| 96 | "libbinder", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 97 | "libcrypto", |
| 98 | "libcutils", |
| 99 | "liblog", |
| 100 | "libnetd_client", |
| 101 | "libnetutils", |
Suren Baghdasaryan | e072a3c | 2019-01-16 14:36:07 -0800 | [diff] [blame] | 102 | "libprocessgroup", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 103 | "libssl", |
Elliott Hughes | bf45813 | 2020-09-16 18:26:41 -0700 | [diff] [blame] | 104 | "libsysutils", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 105 | "libutils", |
Patrick Rohr | bdafd74 | 2022-02-23 19:29:52 +0100 | [diff] [blame] | 106 | "libvintf", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 107 | ], |
| 108 | static_libs: [ |
Chenbo Feng | 6616547 | 2018-07-23 19:05:56 -0700 | [diff] [blame] | 109 | "libcap", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 110 | "libnetd_test_tun_interface", |
Luke Huang | 528af60 | 2018-08-29 19:06:05 +0800 | [diff] [blame] | 111 | "libnetd_test_unsol_service", |
Lorenzo Colitti | 758bccc | 2019-06-26 22:12:35 +0900 | [diff] [blame] | 112 | "libnetd_test_utils", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 113 | "libnetdutils", |
Ken Chen | cf082a3 | 2022-01-15 10:58:55 +0800 | [diff] [blame] | 114 | "libnettestutils", |
Patrick Rohr | b791bd6 | 2022-03-29 21:18:31 +0200 | [diff] [blame] | 115 | "libtcutils", |
paulhu | 7274295 | 2022-02-09 21:24:09 +0800 | [diff] [blame] | 116 | "mdns_aidl_interface-V1-cpp", |
Jeongik Cha | 5f72c8f | 2021-01-26 22:35:13 +0900 | [diff] [blame] | 117 | "netd_event_listener_interface-V1-cpp", |
Luke Huang | 0e5e69d | 2019-03-06 15:42:38 +0800 | [diff] [blame] | 118 | "oemnetd_aidl_interface-cpp", |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 119 | ], |
| 120 | compile_multilib: "both", |
| 121 | multilib: { |
| 122 | lib32: { |
| 123 | suffix: "32", |
| 124 | }, |
| 125 | lib64: { |
| 126 | suffix: "64", |
| 127 | }, |
| 128 | }, |
Bernie Innocenti | 4eb6ecf | 2018-10-02 19:15:35 +0900 | [diff] [blame] | 129 | sanitize: { |
Maciej Żenczykowski | 85a0e3e | 2021-01-15 23:00:47 -0800 | [diff] [blame] | 130 | address: false, |
Bernie Innocenti | 4eb6ecf | 2018-10-02 19:15:35 +0900 | [diff] [blame] | 131 | recover: [ "all" ], |
| 132 | }, |
Bernie Innocenti | 37ceb53 | 2018-06-11 21:10:44 +0900 | [diff] [blame] | 133 | } |