• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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        ":android.hidl.base@1.0_hal",
19    ],
20    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-impl-headers android.hardware.tests.foo@1.0 && " +
21        "$(location hidl-gen) -o $(genDir) -r hidl.tests:system/tools/hidl/test/ " +
22        "-Lc++-impl-headers hidl.tests.vendor.android@1.0",
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        ":android.hardware.tests.foo@1.0_hal",
40        ":hidl.tests.vendor.android@1.0_hal",
41        ":android.hidl.base@1.0_hal",
42    ],
43    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-impl-sources android.hardware.tests.foo@1.0 && " +
44        "$(location hidl-gen) -o $(genDir) -r hidl.tests:system/tools/hidl/test/ " +
45        "-Lc++-impl-sources hidl.tests.vendor.android@1.0",
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        "android.hardware.tests.foo@1.0",
64        "hidl.tests.vendor.android@1.0",
65    ],
66    cflags: [
67        "-Wall",
68        "-Werror",
69        "-Wno-unused-parameter",
70    ],
71}
72