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 16cc_test_library { 17 name: "libnetd_test_tun_interface", 18 defaults: ["netd_defaults"], 19 srcs: [ 20 "tun_interface.cpp" 21 ], 22 export_include_dirs: ["."], 23 shared_libs: [ 24 "libbase", 25 "libnetutils", 26 ], 27} 28 29cc_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-unstable-cpp", 47 ], 48} 49 50cc_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 61cc_test { 62 name: "netd_integration_test", 63 test_suites: [ 64 "device-tests", 65 "vts", 66 ], 67 require_root: true, 68 defaults: ["netd_defaults"], 69 tidy: false, // cuts test build time by almost 1 minute 70 srcs: [ 71 ":netd_integration_test_shared", 72 "binder_test.cpp", 73 "bpf_base_test.cpp", 74 "netd_client_test.cpp", 75 "netd_test.cpp", 76 "netlink_listener_test.cpp", 77 ], 78 include_dirs: ["system/netd/server"], 79 shared_libs: [ 80 "libbase", 81 "libbinder", 82 "libcrypto", 83 "libcutils", 84 "liblog", 85 "libnetd_client", 86 "libnetutils", 87 "libprocessgroup", 88 "libssl", 89 "libutils", 90 ], 91 static_libs: [ 92 "libcap", 93 "libnetd_test_tun_interface", 94 "libnetd_test_unsol_service", 95 "libnetd_test_utils", 96 "libbpf_android", 97 "libnetdbpf", 98 "libnetdutils", 99 "libqtaguid", 100 "netd_aidl_interface-unstable-cpp", 101 "netd_event_listener_interface-cpp", 102 "oemnetd_aidl_interface-cpp", 103 ], 104 compile_multilib: "both", 105 multilib: { 106 lib32: { 107 suffix: "32", 108 }, 109 lib64: { 110 suffix: "64", 111 }, 112 }, 113 sanitize: { 114 address: true, 115 recover: [ "all" ], 116 }, 117} 118