1genrule {
2    name: "hidl_impl_test_gen-headers",
3    tools: [
4        "hidl-gen",
5    ],
6    required: [
7        "android.hardware.tests.foo@1.0",
8    ],
9    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-impl-headers android.hardware.tests.foo@1.0",
10    out: [
11        "FooCallback.h",
12        "Foo.h",
13        "MyTypes.h",
14        "Simple.h",
15        "TheirTypes.h",
16    ],
17}
18genrule {
19    name: "hidl_impl_test_gen-sources",
20    tools: [
21        "hidl-gen",
22    ],
23    required: [
24        "android.hardware.tests.foo@1.0",
25    ],
26    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-impl-sources android.hardware.tests.foo@1.0",
27    out: [
28        "FooCallback.cpp",
29        "Foo.cpp",
30        "MyTypes.cpp",
31        "Simple.cpp",
32        "TheirTypes.cpp",
33    ],
34}
35cc_test_library {
36    name: "hidl_impl_test",
37    generated_sources: ["hidl_impl_test_gen-sources"],
38    generated_headers: ["hidl_impl_test_gen-headers"],
39    shared_libs: [
40        "libhidlbase",
41        "libhidltransport",
42        "libutils",
43        "android.hardware.tests.foo@1.0",
44    ],
45    cflags: [
46        "-Wall",
47        "-Werror",
48        "-Wno-unused-parameter",
49    ],
50}
51