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
10genrule {
11    name: "hidl_cpp_impl_test_gen-headers",
12    tools: [
13        "hidl-gen",
14    ],
15    srcs: [
16        ":[email protected]_hal",
17        ":[email protected]_hal",
18        ":[email protected]_hal",
19    ],
20    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-impl-headers [email protected] && " +
21        "$(location hidl-gen) -o $(genDir) -r hidl.tests:system/tools/hidl/test/ " +
22        "-Lc++-impl-headers [email protected]",
23    out: [
24        "FooCallback.h",
25        "Foo.h",
26        "MyTypes.h",
27        "Simple.h",
28        "TheirTypes.h",
29        "Vendor.h",
30    ],
31}
32
33genrule {
34    name: "hidl_cpp_impl_test_gen-sources",
35    tools: [
36        "hidl-gen",
37    ],
38    srcs: [
39        ":[email protected]_hal",
40        ":[email protected]_hal",
41        ":[email protected]_hal",
42    ],
43    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-impl-sources [email protected] && " +
44        "$(location hidl-gen) -o $(genDir) -r hidl.tests:system/tools/hidl/test/ " +
45        "-Lc++-impl-sources [email protected]",
46    out: [
47        "FooCallback.cpp",
48        "Foo.cpp",
49        "MyTypes.cpp",
50        "Simple.cpp",
51        "TheirTypes.cpp",
52        "Vendor.cpp",
53    ],
54}
55
56cc_test_library {
57    name: "hidl_cpp_impl_test",
58    generated_sources: ["hidl_cpp_impl_test_gen-sources"],
59    generated_headers: ["hidl_cpp_impl_test_gen-headers"],
60    shared_libs: [
61        "libhidlbase",
62        "libutils",
63        "[email protected]",
64        "[email protected]",
65    ],
66    cflags: [
67        "-Wall",
68        "-Werror",
69        "-Wno-unused-parameter",
70    ],
71}
72