Add build rule of driver/profier for graphics allocator hal.
* Updated the corresponding .vts file to match the latest .hal file.
Test: make android.hardware.graphics.allocator.vts.driver@2.0
make android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler
make android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler
Change-Id: Ibf0fdf976a01015cca9cea71a6f25fc513d22d94
diff --git a/graphics/allocator/2.0/Android.bp b/graphics/allocator/2.0/Android.bp
index 8ea4b97..c145bc2 100644
--- a/graphics/allocator/2.0/Android.bp
+++ b/graphics/allocator/2.0/Android.bp
@@ -64,3 +64,160 @@
"android.hidl.base@1.0",
],
}
+
+genrule {
+ name: "android.hardware.graphics.allocator.vts.driver@2.0_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "types.hal",
+ "IAllocator.hal",
+ "IAllocatorClient.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/types.vts.cpp",
+ "android/hardware/graphics/allocator/2.0/Allocator.vts.cpp",
+ "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator.vts.driver@2.0_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "types.hal",
+ "IAllocator.hal",
+ "IAllocatorClient.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/types.vts.h",
+ "android/hardware/graphics/allocator/2.0/Allocator.vts.h",
+ "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.graphics.allocator.vts.driver@2.0",
+ generated_sources: ["android.hardware.graphics.allocator.vts.driver@2.0_genc++"],
+ generated_headers: ["android.hardware.graphics.allocator.vts.driver@2.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.graphics.allocator.vts.driver@2.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "libvts_common",
+ "libvts_datatype",
+ "libvts_measurement",
+ "libvts_multidevice_proto",
+ "libcamera_metadata",
+ "libprotobuf-cpp-full",
+ "android.hardware.graphics.common@1.0",
+ "android.hidl.base@1.0",
+ "android.hardware.graphics.allocator@2.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hardware.graphics.common@1.0",
+ "android.hidl.base@1.0",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "IAllocator.hal",
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/Allocator.vts.cpp",
+ "android/hardware/graphics/allocator/2.0/types.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "IAllocator.hal",
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/Allocator.vts.h",
+ "android/hardware/graphics/allocator/2.0/types.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler",
+ generated_sources: ["android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++"],
+ generated_headers: ["android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++_headers"],
+ export_generated_headers: ["android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++_headers"],
+ shared_libs: [
+ "libbase",
+ "libhidlbase",
+ "libhidltransport",
+ "libvts_profiling",
+ "libvts_multidevice_proto",
+ "libprotobuf-cpp-full",
+ "android.hardware.graphics.common@1.0",
+ "android.hidl.base@1.0",
+ "android.hardware.graphics.allocator@2.0",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "IAllocatorClient.hal",
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.cpp",
+ "android/hardware/graphics/allocator/2.0/types.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "IAllocatorClient.hal",
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.h",
+ "android/hardware/graphics/allocator/2.0/types.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler",
+ generated_sources: ["android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++"],
+ generated_headers: ["android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++_headers"],
+ export_generated_headers: ["android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++_headers"],
+ shared_libs: [
+ "libbase",
+ "libhidlbase",
+ "libhidltransport",
+ "libvts_profiling",
+ "libvts_multidevice_proto",
+ "libprotobuf-cpp-full",
+ "android.hardware.graphics.common@1.0",
+ "android.hidl.base@1.0",
+ "android.hardware.graphics.allocator@2.0",
+ ],
+}
+