From 3e32003be1873f11e77b0f4a0479ddd202392938 Mon Sep 17 00:00:00 2001 From: Hridya Valsaraju Date: Mon, 8 Aug 2016 11:12:30 -0700 Subject: [PATCH] Move .hal file for FMQ tests to harware/interfaces This is required to convert to the new hidl-gen. Change-Id: I87a5d3d006fe80ad16d4abb63d400b3c52a2bae9 --- tests/msgq/1.0/Android.mk | 33 +++++++++++++++++++++++++++++++++ tests/msgq/1.0/ITestMsgQ.hal | 28 ++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 tests/msgq/1.0/Android.mk create mode 100644 tests/msgq/1.0/ITestMsgQ.hal diff --git a/tests/msgq/1.0/Android.mk b/tests/msgq/1.0/Android.mk new file mode 100644 index 0000000000..cf5475a360 --- /dev/null +++ b/tests/msgq/1.0/Android.mk @@ -0,0 +1,33 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := android.hardware.tests.msgq@1.0 +LOCAL_MODULE_CLASS := SHARED_LIBRARIES + +intermediates := $(local-generated-sources-dir) + +HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) + +# +# Build ITestMsgQ.hal +# +GEN := $(intermediates)/android/hardware/tests/msgq/1.0/TestMsgQAll.cpp +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ITestMsgQ.hal +$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) +$(GEN): PRIVATE_CUSTOM_TOOL = \ + $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ + -Lc++ -randroid.hardware:hardware/interfaces\ + android.hardware.tests.msgq@1.0::$(patsubst %.hal,%,$(notdir $(PRIVATE_DEPS))) + +$(GEN): $(LOCAL_PATH)/ITestMsgQ.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates) +LOCAL_SHARED_LIBRARIES := \ + libhwbinder \ + libutils \ + +include $(BUILD_SHARED_LIBRARY) diff --git a/tests/msgq/1.0/ITestMsgQ.hal b/tests/msgq/1.0/ITestMsgQ.hal new file mode 100644 index 0000000000..4ff60a86be --- /dev/null +++ b/tests/msgq/1.0/ITestMsgQ.hal @@ -0,0 +1,28 @@ +package android.hardware.tests.msgq@1.0; + +interface ITestMsgQ { + + struct shm_t { + uint32_t fdIndex; + uint32_t offset; + uint32_t extent; + }; + struct WireGrantorDescriptor { + uint32_t flags; + shm_t shm; + }; + + struct WireMQDescriptor { + vec grantors; + handle mq_handle; + uint32_t quantum; + uint32_t nQuanta; + uint32_t flags; + }; + + + configure() generates ( WireMQDescriptor mq_desc ); + requestWrite (int32_t count) generates (int32_t ret); + requestRead(int32_t count) generates (int32_t ret); + +};