1package {
2    default_team: "trendy_team_fwk_core_networking",
3    default_applicable_licenses: ["Android-Apache-2.0"],
4}
5
6filegroup {
7    name: "dns_async_test_default_map",
8    srcs: ["dns_async_test_default.map"],
9}
10
11cc_defaults {
12    name: "dns_async_defaults",
13
14    cflags: [
15        "-fstack-protector-all",
16        "-g",
17        "-Wall",
18        "-Wextra",
19        "-Werror",
20        "-Wnullable-to-nonnull-conversion",
21        "-Wsign-compare",
22        "-Wthread-safety",
23        "-Wunused-parameter",
24    ],
25    srcs: [
26        "NativeDnsAsyncTest.cpp",
27    ],
28    // This test runs on older platform versions, so many libraries (such as libbase and libc++)
29    // need to be linked statically. The test also needs to be linked with a version script to
30    // ensure that the statically-linked library isn't exported from the executable, where it
31    // would override the shared libraries that the platform itself uses.
32    // See http://b/333438055 for an example of what goes wrong when libc++ is partially exported
33    // from an executable.
34    version_script: ":dns_async_test_default_map",
35    stl: "libc++_static",
36    shared_libs: [
37        "libandroid",
38        "liblog",
39        "libutils",
40    ],
41    static_libs: [
42        "libbase",
43        "libnetdutils",
44    ],
45    // To be compatible with R devices, the min_sdk_version must be 30.
46    min_sdk_version: "30",
47    host_required: ["net-tests-utils-host-common"],
48}
49
50cc_test {
51    name: "CtsNativeNetDnsTestCases",
52    defaults: ["dns_async_defaults"],
53    multilib: {
54        lib32: {
55            suffix: "32",
56        },
57        lib64: {
58            suffix: "64",
59        },
60    },
61    test_suites: [
62        "cts",
63        "general-tests",
64        "mts-dnsresolver",
65        "mts-networking",
66        "mcts-dnsresolver",
67        "mcts-networking",
68    ],
69}
70