1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "system_tools_hidl_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["system_tools_hidl_license"],
8}
9
10python_test_host {
11    name: "hidl_test",
12    main: "hidl_test.py",
13    srcs: ["hidl_test.py"],
14    test_config: "hidl_test.xml",
15    data_device_bins_both: [
16        "hidl_test_client",
17        "hidl_test_servers",
18    ],
19    test_suites: ["general-tests"],
20    test_options: {
21        unit_test: false,
22    },
23}
24
25cc_defaults {
26    name: "hidl_test-defaults",
27    defaults: ["hidl-gen-defaults"],
28
29    shared_libs: [
30        "[email protected]",
31        "[email protected]",
32        "[email protected]",
33        "libbase",
34        "libcutils",
35        "libhidlbase",
36        "libhidlmemory",
37        "liblog",
38        "libutils",
39    ],
40
41    // Allow dlsym'ing self for statically linked passthrough implementations
42    ldflags: ["-rdynamic"],
43
44    // These are static libs only for testing purposes and portability. Shared
45    // libs should be used on device.
46    static_libs: [
47        "libfootest",
48        "libhidl-gen-utils",
49        "[email protected]",
50        "[email protected]",
51        "[email protected]",
52        "[email protected]",
53        "[email protected]",
54        "[email protected]",
55        "[email protected]",
56        "[email protected]",
57        "[email protected]",
58        "[email protected]",
59        "[email protected]",
60    ],
61
62    // impls should never be static, these are used only for testing purposes
63    // and test portability since this test pairs with specific hal
64    // implementations
65    whole_static_libs: [
66        "[email protected]",
67        "[email protected]",
68        "[email protected]",
69        "[email protected]",
70        "[email protected]",
71        "[email protected]",
72        "[email protected]",
73        "[email protected]",
74        "[email protected]",
75        "[email protected]",
76    ],
77
78    group_static_libs: true,
79
80    compile_multilib: "both",
81    multilib: {
82        lib32: {
83            suffix: "32",
84        },
85        lib64: {
86            suffix: "64",
87        },
88    },
89    test_suites: ["general-tests"],
90}
91
92cc_test {
93    name: "hidl_test_client",
94    defaults: ["hidl_test-defaults"],
95
96    tidy_timeout_srcs: [
97        "hidl_test_client.cpp",
98    ],
99    srcs: [
100        "hidl_test_client.cpp",
101        "FooCallback.cpp",
102        "static_test.cpp",
103    ],
104
105    shared_libs: [
106        "[email protected]",
107    ],
108}
109
110cc_test {
111    name: "hidl_test_servers",
112    defaults: ["hidl_test-defaults"],
113    srcs: ["hidl_test_servers.cpp"],
114    gtest: false,
115}
116