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