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
16package {
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
25cc_test_library {
26    name: "libnetd_test_tun_interface",
27    defaults: ["netd_defaults"],
28    srcs: [
29        "tun_interface.cpp"
30    ],
31    export_include_dirs: ["."],
32    shared_libs: [
33        "libbase",
34        "libnetutils",
35    ],
36}
37
38cc_test_library {
39    name: "libnetd_test_unsol_service",
40    defaults: ["netd_defaults"],
41    srcs: [
42        "TestUnsolService.cpp"
43    ],
44    include_dirs: [
45        "system/netd/include",
46    ],
47    shared_libs: [
48        "libbase",
49        "libbinder",
50        "libcutils",
51        "liblog",
52        "libnetutils",
53        "libsysutils",
54        "libutils",
55        "netd_aidl_interface-V7-cpp",
56    ],
57}
58
59cc_test_library {
60    name: "libnetd_test_utils",
61    srcs: [
62        "test_utils.cpp"
63    ],
64    export_include_dirs: ["."],
65    shared_libs: [
66        "libbase",
67    ],
68}
69
70cc_test {
71    name: "netd_integration_test",
72    test_suites: [
73        "device-tests",
74        "vts"
75    ],
76    require_root: true,
77    defaults: ["netd_defaults"],
78    tidy: false,  // cuts test build time by almost 1 minute
79    srcs: [
80        ":netd_integration_test_shared",
81        "binder_test.cpp",
82        "bpf_base_test.cpp",
83        "netd_client_test.cpp",
84        "netd_test.cpp",
85        "netlink_listener_test.cpp",
86    ],
87    include_dirs: ["system/netd/server"],
88    shared_libs: [
89        "libbase",
90        "libbinder",
91        "libcrypto",
92        "libcutils",
93        "liblog",
94        "libnetd_client",
95        "libnetutils",
96        "libprocessgroup",
97        "libssl",
98        "libsysutils",
99        "libutils",
100    ],
101    static_libs: [
102        "libcap",
103        "libnetd_test_tun_interface",
104        "libnetd_test_unsol_service",
105        "libnetd_test_utils",
106        "libbpf_android",
107        "libnetdbpf",
108        "libnetdutils",
109        "libqtaguid",
110        "netd_aidl_interface-V7-cpp",
111        "netd_event_listener_interface-V1-cpp",
112        "oemnetd_aidl_interface-cpp",
113    ],
114    compile_multilib: "both",
115    multilib: {
116        lib32: {
117            suffix: "32",
118        },
119        lib64: {
120            suffix: "64",
121        },
122    },
123    sanitize: {
124        address: false,
125        recover: [ "all" ],
126    },
127}
128