summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-09-28 16:12:24 -0700
committerDan Willemsen <dwillemsen@google.com>2016-09-30 10:31:54 -0700
commit242b34edd546e63495466083c80f794cd9180ab2 (patch)
treef83cf3292d3f816345213d2e3db11f1e26b75c0d /tests
parentfe2b0983553f88370ce6a317ef7bb4b2baec42b3 (diff)
downloadplatform_hardware_interfaces-242b34edd546e63495466083c80f794cd9180ab2.tar.gz
platform_hardware_interfaces-242b34edd546e63495466083c80f794cd9180ab2.tar.bz2
platform_hardware_interfaces-242b34edd546e63495466083c80f794cd9180ab2.zip
Convert to Android.bp
See build/soong/README.md for more information. Bug: 31742855 Test: mma -j Change-Id: Icb93f3b1b2caeb5e9c00f88ca35841b927ad075d
Diffstat (limited to 'tests')
-rw-r--r--tests/bar/1.0/Android.bp43
-rw-r--r--tests/bar/1.0/Android.mk40
-rw-r--r--tests/baz/1.0/Android.bp62
-rw-r--r--tests/baz/1.0/Android.mk92
-rw-r--r--tests/expression/1.0/Android.bp50
-rw-r--r--tests/expression/1.0/Android.mk56
-rw-r--r--tests/foo/1.0/Android.bp54
-rw-r--r--tests/foo/1.0/Android.mk77
-rw-r--r--tests/libhwbinder/1.0/Android.bp42
-rw-r--r--tests/libhwbinder/1.0/Android.mk37
-rw-r--r--tests/msgq/1.0/Android.bp42
-rw-r--r--tests/msgq/1.0/Android.mk39
-rw-r--r--tests/pointer/1.0/Android.bp50
-rw-r--r--tests/pointer/1.0/Android.mk53
14 files changed, 349 insertions, 388 deletions
diff --git a/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
new file mode 100644
index 0000000000..b87974114c
--- /dev/null
+++ b/tests/bar/1.0/Android.bp
@@ -0,0 +1,43 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.tests.bar@1.0_genc++",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.bar@1.0",
+ srcs: [
+ "IBar.hal",
+ ],
+ out: [
+ "android/hardware/tests/bar/1.0/BarAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tests.bar@1.0_genc++_headers",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.bar@1.0",
+ srcs: [
+ "IBar.hal",
+ ],
+ out: [
+ "android/hardware/tests/bar/1.0/IBar.h",
+ "android/hardware/tests/bar/1.0/IHwBar.h",
+ "android/hardware/tests/bar/1.0/BnBar.h",
+ "android/hardware/tests/bar/1.0/BpBar.h",
+ "android/hardware/tests/bar/1.0/BsBar.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tests.bar@1.0",
+ generated_sources: ["android.hardware.tests.bar@1.0_genc++"],
+ generated_headers: ["android.hardware.tests.bar@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tests.bar@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
+ "libcutils",
+ "android.hardware.tests.foo@1.0",
+ ],
+}
diff --git a/tests/bar/1.0/Android.mk b/tests/bar/1.0/Android.mk
deleted file mode 100644
index ef278ae381..0000000000
--- a/tests/bar/1.0/Android.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.hardware.tests.bar@1.0
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-
-intermediates := $(local-generated-sources-dir)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-#
-# Build IBar.hal
-#
-GEN := $(intermediates)/android/hardware/tests/bar/1.0/BarAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBar.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.bar@1.0::IBar
-
-$(GEN): $(LOCAL_PATH)/IBar.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
-LOCAL_SHARED_LIBRARIES := \
- libhidl \
- libhwbinder \
- libutils \
- libcutils \
- android.hardware.tests.foo@1.0 \
-
-LOCAL_MULTILIB := both
-include $(BUILD_SHARED_LIBRARY)
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
new file mode 100644
index 0000000000..d3eefe52d5
--- /dev/null
+++ b/tests/baz/1.0/Android.bp
@@ -0,0 +1,62 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.tests.baz@1.0_genc++",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.baz@1.0",
+ srcs: [
+ "types.hal",
+ "IBase.hal",
+ "IBaz.hal",
+ "IBazCallback.hal",
+ ],
+ out: [
+ "android/hardware/tests/baz/1.0/types.cpp",
+ "android/hardware/tests/baz/1.0/BaseAll.cpp",
+ "android/hardware/tests/baz/1.0/BazAll.cpp",
+ "android/hardware/tests/baz/1.0/BazCallbackAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tests.baz@1.0_genc++_headers",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.baz@1.0",
+ srcs: [
+ "types.hal",
+ "IBase.hal",
+ "IBaz.hal",
+ "IBazCallback.hal",
+ ],
+ out: [
+ "android/hardware/tests/baz/1.0/types.h",
+ "android/hardware/tests/baz/1.0/IBase.h",
+ "android/hardware/tests/baz/1.0/IHwBase.h",
+ "android/hardware/tests/baz/1.0/BnBase.h",
+ "android/hardware/tests/baz/1.0/BpBase.h",
+ "android/hardware/tests/baz/1.0/BsBase.h",
+ "android/hardware/tests/baz/1.0/IBaz.h",
+ "android/hardware/tests/baz/1.0/IHwBaz.h",
+ "android/hardware/tests/baz/1.0/BnBaz.h",
+ "android/hardware/tests/baz/1.0/BpBaz.h",
+ "android/hardware/tests/baz/1.0/BsBaz.h",
+ "android/hardware/tests/baz/1.0/IBazCallback.h",
+ "android/hardware/tests/baz/1.0/IHwBazCallback.h",
+ "android/hardware/tests/baz/1.0/BnBazCallback.h",
+ "android/hardware/tests/baz/1.0/BpBazCallback.h",
+ "android/hardware/tests/baz/1.0/BsBazCallback.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tests.baz@1.0",
+ generated_sources: ["android.hardware.tests.baz@1.0_genc++"],
+ generated_headers: ["android.hardware.tests.baz@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tests.baz@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
+ "libcutils",
+ ],
+}
diff --git a/tests/baz/1.0/Android.mk b/tests/baz/1.0/Android.mk
index 56e2ea977b..f75f2ffbc8 100644
--- a/tests/baz/1.0/Android.mk
+++ b/tests/baz/1.0/Android.mk
@@ -1,94 +1,6 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.hardware.tests.baz@1.0
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-
-intermediates := $(local-generated-sources-dir)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-#
-# Build types.hal
-#
-GEN := $(intermediates)/android/hardware/tests/baz/1.0/types.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.baz@1.0::types
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
+# This file is autogenerated by hidl-gen. Do not edit manually.
-#
-# Build IBase.hal
-#
-GEN := $(intermediates)/android/hardware/tests/baz/1.0/BaseAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBase.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.baz@1.0::IBase
-
-$(GEN): $(LOCAL_PATH)/IBase.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IBaz.hal
-#
-GEN := $(intermediates)/android/hardware/tests/baz/1.0/BazAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBaz.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IBase.hal
-$(GEN): $(LOCAL_PATH)/IBase.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IBazCallback.hal
-$(GEN): $(LOCAL_PATH)/IBazCallback.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.baz@1.0::IBaz
-
-$(GEN): $(LOCAL_PATH)/IBaz.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IBazCallback.hal
-#
-GEN := $(intermediates)/android/hardware/tests/baz/1.0/BazCallbackAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBazCallback.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.baz@1.0::IBazCallback
-
-$(GEN): $(LOCAL_PATH)/IBazCallback.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
-LOCAL_SHARED_LIBRARIES := \
- libhidl \
- libhwbinder \
- libutils \
- libcutils \
-
-LOCAL_MULTILIB := both
-include $(BUILD_SHARED_LIBRARY)
+LOCAL_PATH := $(call my-dir)
################################################################################
diff --git a/tests/expression/1.0/Android.bp b/tests/expression/1.0/Android.bp
new file mode 100644
index 0000000000..32d468281b
--- /dev/null
+++ b/tests/expression/1.0/Android.bp
@@ -0,0 +1,50 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.tests.expression@1.0_genc++",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.expression@1.0",
+ srcs: [
+ "IExpression.hal",
+ "IExpressionExt.hal",
+ ],
+ out: [
+ "android/hardware/tests/expression/1.0/ExpressionAll.cpp",
+ "android/hardware/tests/expression/1.0/ExpressionExtAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tests.expression@1.0_genc++_headers",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.expression@1.0",
+ srcs: [
+ "IExpression.hal",
+ "IExpressionExt.hal",
+ ],
+ out: [
+ "android/hardware/tests/expression/1.0/IExpression.h",
+ "android/hardware/tests/expression/1.0/IHwExpression.h",
+ "android/hardware/tests/expression/1.0/BnExpression.h",
+ "android/hardware/tests/expression/1.0/BpExpression.h",
+ "android/hardware/tests/expression/1.0/BsExpression.h",
+ "android/hardware/tests/expression/1.0/IExpressionExt.h",
+ "android/hardware/tests/expression/1.0/IHwExpressionExt.h",
+ "android/hardware/tests/expression/1.0/BnExpressionExt.h",
+ "android/hardware/tests/expression/1.0/BpExpressionExt.h",
+ "android/hardware/tests/expression/1.0/BsExpressionExt.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tests.expression@1.0",
+ generated_sources: ["android.hardware.tests.expression@1.0_genc++"],
+ generated_headers: ["android.hardware.tests.expression@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tests.expression@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
+ "libcutils",
+ ],
+}
diff --git a/tests/expression/1.0/Android.mk b/tests/expression/1.0/Android.mk
index 804af71649..dbb97dc5d2 100644
--- a/tests/expression/1.0/Android.mk
+++ b/tests/expression/1.0/Android.mk
@@ -1,58 +1,6 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.hardware.tests.expression@1.0
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+# This file is autogenerated by hidl-gen. Do not edit manually.
-intermediates := $(local-generated-sources-dir)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-#
-# Build IExpression.hal
-#
-GEN := $(intermediates)/android/hardware/tests/expression/1.0/ExpressionAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IExpression.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.expression@1.0::IExpression
-
-$(GEN): $(LOCAL_PATH)/IExpression.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IExpressionExt.hal
-#
-GEN := $(intermediates)/android/hardware/tests/expression/1.0/ExpressionExtAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IExpressionExt.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IExpression.hal
-$(GEN): $(LOCAL_PATH)/IExpression.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.expression@1.0::IExpressionExt
-
-$(GEN): $(LOCAL_PATH)/IExpressionExt.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
-LOCAL_SHARED_LIBRARIES := \
- libhidl \
- libhwbinder \
- libutils \
- libcutils \
-
-LOCAL_MULTILIB := both
-include $(BUILD_SHARED_LIBRARY)
+LOCAL_PATH := $(call my-dir)
################################################################################
diff --git a/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
new file mode 100644
index 0000000000..4896fc3d3a
--- /dev/null
+++ b/tests/foo/1.0/Android.bp
@@ -0,0 +1,54 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.tests.foo@1.0_genc++",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.foo@1.0",
+ srcs: [
+ "types.hal",
+ "IFoo.hal",
+ "IFooCallback.hal",
+ ],
+ out: [
+ "android/hardware/tests/foo/1.0/types.cpp",
+ "android/hardware/tests/foo/1.0/FooAll.cpp",
+ "android/hardware/tests/foo/1.0/FooCallbackAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tests.foo@1.0_genc++_headers",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.foo@1.0",
+ srcs: [
+ "types.hal",
+ "IFoo.hal",
+ "IFooCallback.hal",
+ ],
+ out: [
+ "android/hardware/tests/foo/1.0/types.h",
+ "android/hardware/tests/foo/1.0/IFoo.h",
+ "android/hardware/tests/foo/1.0/IHwFoo.h",
+ "android/hardware/tests/foo/1.0/BnFoo.h",
+ "android/hardware/tests/foo/1.0/BpFoo.h",
+ "android/hardware/tests/foo/1.0/BsFoo.h",
+ "android/hardware/tests/foo/1.0/IFooCallback.h",
+ "android/hardware/tests/foo/1.0/IHwFooCallback.h",
+ "android/hardware/tests/foo/1.0/BnFooCallback.h",
+ "android/hardware/tests/foo/1.0/BpFooCallback.h",
+ "android/hardware/tests/foo/1.0/BsFooCallback.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tests.foo@1.0",
+ generated_sources: ["android.hardware.tests.foo@1.0_genc++"],
+ generated_headers: ["android.hardware.tests.foo@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tests.foo@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
+ "libcutils",
+ ],
+}
diff --git a/tests/foo/1.0/Android.mk b/tests/foo/1.0/Android.mk
deleted file mode 100644
index ee503efebb..0000000000
--- a/tests/foo/1.0/Android.mk
+++ /dev/null
@@ -1,77 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.hardware.tests.foo@1.0
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-
-intermediates := $(local-generated-sources-dir)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-#
-# Build types.hal
-#
-GEN := $(intermediates)/android/hardware/tests/foo/1.0/types.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.foo@1.0::types
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IFoo.hal
-#
-GEN := $(intermediates)/android/hardware/tests/foo/1.0/FooAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IFoo.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IFooCallback.hal
-$(GEN): $(LOCAL_PATH)/IFooCallback.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.foo@1.0::IFoo
-
-$(GEN): $(LOCAL_PATH)/IFoo.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IFooCallback.hal
-#
-GEN := $(intermediates)/android/hardware/tests/foo/1.0/FooCallbackAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IFooCallback.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.foo@1.0::IFooCallback
-
-$(GEN): $(LOCAL_PATH)/IFooCallback.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
-LOCAL_SHARED_LIBRARIES := \
- libhidl \
- libhwbinder \
- libutils \
- libcutils \
-
-LOCAL_MULTILIB := both
-include $(BUILD_SHARED_LIBRARY)
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/libhwbinder/1.0/Android.bp b/tests/libhwbinder/1.0/Android.bp
new file mode 100644
index 0000000000..508de22830
--- /dev/null
+++ b/tests/libhwbinder/1.0/Android.bp
@@ -0,0 +1,42 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.tests.libhwbinder@1.0_genc++",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.libhwbinder@1.0",
+ srcs: [
+ "IBenchmark.hal",
+ ],
+ out: [
+ "android/hardware/tests/libhwbinder/1.0/BenchmarkAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tests.libhwbinder@1.0_genc++_headers",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.libhwbinder@1.0",
+ srcs: [
+ "IBenchmark.hal",
+ ],
+ out: [
+ "android/hardware/tests/libhwbinder/1.0/IBenchmark.h",
+ "android/hardware/tests/libhwbinder/1.0/IHwBenchmark.h",
+ "android/hardware/tests/libhwbinder/1.0/BnBenchmark.h",
+ "android/hardware/tests/libhwbinder/1.0/BpBenchmark.h",
+ "android/hardware/tests/libhwbinder/1.0/BsBenchmark.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tests.libhwbinder@1.0",
+ generated_sources: ["android.hardware.tests.libhwbinder@1.0_genc++"],
+ generated_headers: ["android.hardware.tests.libhwbinder@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tests.libhwbinder@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
+ "libcutils",
+ ],
+}
diff --git a/tests/libhwbinder/1.0/Android.mk b/tests/libhwbinder/1.0/Android.mk
index 61349afbe4..c7b94098eb 100644
--- a/tests/libhwbinder/1.0/Android.mk
+++ b/tests/libhwbinder/1.0/Android.mk
@@ -1,39 +1,6 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.hardware.tests.libhwbinder@1.0
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-
-intermediates := $(local-generated-sources-dir)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-#
-# Build IBenchmark.hal
-#
-GEN := $(intermediates)/android/hardware/tests/libhwbinder/1.0/BenchmarkAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBenchmark.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.libhwbinder@1.0::IBenchmark
+# This file is autogenerated by hidl-gen. Do not edit manually.
-$(GEN): $(LOCAL_PATH)/IBenchmark.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
-LOCAL_SHARED_LIBRARIES := \
- libhidl \
- libhwbinder \
- libutils \
- libcutils \
-
-LOCAL_MULTILIB := both
-include $(BUILD_SHARED_LIBRARY)
+LOCAL_PATH := $(call my-dir)
################################################################################
diff --git a/tests/msgq/1.0/Android.bp b/tests/msgq/1.0/Android.bp
new file mode 100644
index 0000000000..16454ec71d
--- /dev/null
+++ b/tests/msgq/1.0/Android.bp
@@ -0,0 +1,42 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.tests.msgq@1.0_genc++",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.msgq@1.0",
+ srcs: [
+ "ITestMsgQ.hal",
+ ],
+ out: [
+ "android/hardware/tests/msgq/1.0/TestMsgQAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tests.msgq@1.0_genc++_headers",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.msgq@1.0",
+ srcs: [
+ "ITestMsgQ.hal",
+ ],
+ out: [
+ "android/hardware/tests/msgq/1.0/ITestMsgQ.h",
+ "android/hardware/tests/msgq/1.0/IHwTestMsgQ.h",
+ "android/hardware/tests/msgq/1.0/BnTestMsgQ.h",
+ "android/hardware/tests/msgq/1.0/BpTestMsgQ.h",
+ "android/hardware/tests/msgq/1.0/BsTestMsgQ.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tests.msgq@1.0",
+ generated_sources: ["android.hardware.tests.msgq@1.0_genc++"],
+ generated_headers: ["android.hardware.tests.msgq@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tests.msgq@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
+ "libcutils",
+ ],
+}
diff --git a/tests/msgq/1.0/Android.mk b/tests/msgq/1.0/Android.mk
deleted file mode 100644
index 2cde5bf991..0000000000
--- a/tests/msgq/1.0/Android.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-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::ITestMsgQ
-
-$(GEN): $(LOCAL_PATH)/ITestMsgQ.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
-LOCAL_SHARED_LIBRARIES := \
- libhidl \
- libhwbinder \
- libutils \
- libcutils \
-
-LOCAL_MULTILIB := both
-include $(BUILD_SHARED_LIBRARY)
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/pointer/1.0/Android.bp b/tests/pointer/1.0/Android.bp
new file mode 100644
index 0000000000..45659d71ce
--- /dev/null
+++ b/tests/pointer/1.0/Android.bp
@@ -0,0 +1,50 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.tests.pointer@1.0_genc++",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.pointer@1.0",
+ srcs: [
+ "IGraph.hal",
+ "IPointer.hal",
+ ],
+ out: [
+ "android/hardware/tests/pointer/1.0/GraphAll.cpp",
+ "android/hardware/tests/pointer/1.0/PointerAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tests.pointer@1.0_genc++_headers",
+ tool: "hidl-gen",
+ cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tests.pointer@1.0",
+ srcs: [
+ "IGraph.hal",
+ "IPointer.hal",
+ ],
+ out: [
+ "android/hardware/tests/pointer/1.0/IGraph.h",
+ "android/hardware/tests/pointer/1.0/IHwGraph.h",
+ "android/hardware/tests/pointer/1.0/BnGraph.h",
+ "android/hardware/tests/pointer/1.0/BpGraph.h",
+ "android/hardware/tests/pointer/1.0/BsGraph.h",
+ "android/hardware/tests/pointer/1.0/IPointer.h",
+ "android/hardware/tests/pointer/1.0/IHwPointer.h",
+ "android/hardware/tests/pointer/1.0/BnPointer.h",
+ "android/hardware/tests/pointer/1.0/BpPointer.h",
+ "android/hardware/tests/pointer/1.0/BsPointer.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tests.pointer@1.0",
+ generated_sources: ["android.hardware.tests.pointer@1.0_genc++"],
+ generated_headers: ["android.hardware.tests.pointer@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tests.pointer@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
+ "libcutils",
+ ],
+}
diff --git a/tests/pointer/1.0/Android.mk b/tests/pointer/1.0/Android.mk
deleted file mode 100644
index d1c23bf2c7..0000000000
--- a/tests/pointer/1.0/Android.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.hardware.tests.pointer@1.0
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-
-intermediates := $(local-generated-sources-dir)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-#
-# Build IGraph.hal
-#
-GEN := $(intermediates)/android/hardware/tests/pointer/1.0/GraphAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IGraph.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.pointer@1.0::IGraph
-
-$(GEN): $(LOCAL_PATH)/IGraph.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IPointer.hal
-#
-GEN := $(intermediates)/android/hardware/tests/pointer/1.0/PointerAll.cpp
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IPointer.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Lc++ -randroid.hardware:hardware/interfaces \
- android.hardware.tests.pointer@1.0::IPointer
-
-$(GEN): $(LOCAL_PATH)/IPointer.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
-LOCAL_SHARED_LIBRARIES := \
- libhidl \
- libhwbinder \
- libutils \
- libcutils \
-
-LOCAL_MULTILIB := both
-include $(BUILD_SHARED_LIBRARY)