xref: /aosp_15_r20/system/nfc/tests/Android.bp (revision 7eba2f3b06c51ae21384f6a4f14577b668a869b3)
1package {
2    default_team: "trendy_team_fwk_nfc",
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "system_nfc_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["system_nfc_license"],
9}
10
11cc_test {
12    name: "libnfc-nci-tests",
13    include_dirs: [
14        "system/nfc/src/include",
15        "system/nfc/utils/include",
16        "system/nfc/src/nfc/include",
17        "system/nfc/src/gki/common",
18        "system/nfc/src/gki/ulinux",
19        "system/nfc/src/nfa/include",
20        "system/nfc/src/nfa/ce",
21        "system/nfc/src/nfa/dm",
22    ],
23    cflags: [
24        "-Wall",
25        "-Werror",
26    ],
27    target: {
28        host_linux: {
29            cflags: ["-D_GNU_SOURCE"],
30        },
31        darwin: {
32            enabled: false,
33        },
34    },
35    sanitize: {
36        integer_overflow: true,
37        misc_undefined: ["bounds"],
38        scs: true,
39    },
40    srcs: [
41        "**/*.cc",
42    ],
43    static_libs: [
44        "libgmock",
45        "libnfc-nci",
46        "libnfcutils",
47        "[email protected]",
48        "[email protected]",
49        "[email protected]",
50        // Add for AIDL
51        "android.hardware.nfc-V2-ndk",
52        "libnfc-nci_flags",
53        "libstatslog_nfc",
54    ],
55    shared_libs: [
56        "libcutils",
57        "liblog",
58        "libdl",
59        "libz",
60        "libbase",
61        // Treble configuration
62        "libhidlbase",
63        "libutils",
64        "libbinder_ndk",
65        "libstatssocket",
66        "server_configurable_flags",
67        "libaconfig_storage_read_api_cc",
68    ],
69    test_suites: [
70        "general-tests",
71        "mts-nfc",
72    ],
73    test_config_template: "nfc_test_config_template.xml",
74    // Support multilib variants (using different suffix per sub-architecture), which is needed on
75    // build targets with secondary architectures, as the MTS test suite packaging logic flattens
76    // all test artifacts into a single `testcases` directory.
77    compile_multilib: "both",
78    multilib: {
79        lib32: {
80            suffix: "32",
81        },
82        lib64: {
83            suffix: "64",
84        },
85    },
86    auto_gen_config: true,
87    min_sdk_version: "current",
88}
89