summaryrefslogtreecommitdiff
path: root/vibrator
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-04-22 02:33:06 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-04-22 02:33:06 +0000
commitc93cec5cd83813b1abdbaa020def33949d1bc815 (patch)
tree71a1de522bc981b89d64efadcf506ebebac6525e /vibrator
parentcd79f70455d6de22038ab157b395c06a518571d3 (diff)
parentd14d2354e2f19549a6a2a298bf905c7a0609458f (diff)
downloadbramble-c93cec5cd83813b1abdbaa020def33949d1bc815.tar.gz
Merge "vibrator: Reenable Unit Tests" into rvc-dev am: d14d2354e2
Change-Id: I5fff367828c08488b4d2abbd4aa72ad8f317478e
Diffstat (limited to 'vibrator')
-rw-r--r--vibrator/drv2624/Android.bp47
-rw-r--r--vibrator/drv2624/bench/Android.bp17
-rw-r--r--vibrator/drv2624/tests/Android.bp16
3 files changed, 67 insertions, 13 deletions
diff --git a/vibrator/drv2624/Android.bp b/vibrator/drv2624/Android.bp
index fac6478..3cb11b2 100644
--- a/vibrator/drv2624/Android.bp
+++ b/vibrator/drv2624/Android.bp
@@ -19,19 +19,14 @@ cc_defaults {
"-DATRACE_TAG=(ATRACE_TAG_VIBRATOR | ATRACE_TAG_HAL)",
"-DLOG_TAG=\"android.hardware.vibrator-bramble\"",
],
-}
-
-cc_defaults {
- name: "VibratorHalDrv2624BinaryDefaultsBramble",
- defaults: [
- "PixelVibratorBinaryDefaults",
- "android.hardware.vibrator-defaults.bramble",
+ shared_libs: [
+ "libandroid",
],
target: {
- android: {
- // TODO: Add sensor stub for tests.
- },
vendor: {
+ exclude_shared_libs: [
+ "libandroid",
+ ],
shared_libs: [
"libsensorndkbridge",
],
@@ -39,21 +34,47 @@ cc_defaults {
},
}
+cc_defaults {
+ name: "VibratorHalDrv2624BinaryDefaultsBramble",
+ defaults: [
+ "PixelVibratorBinaryDefaults",
+ "android.hardware.vibrator-defaults.bramble",
+ ],
+}
+
+cc_defaults {
+ name: "VibratorHalDrv2624TestDefaultsBramble",
+ defaults: [
+ "PixelVibratorTestDefaults",
+ "android.hardware.vibrator-defaults.bramble",
+ ],
+ static_libs: ["android.hardware.vibrator-impl_system.bramble"],
+}
+
+// TODO(eliptus): Combine library definitions when b/129505315 is resolved.
+
cc_library {
- name: "android.hardware.vibrator-impl.bramble",
+ name: "android.hardware.vibrator-impl_system.bramble",
defaults: ["VibratorHalDrv2624BinaryDefaultsBramble"],
srcs: ["Vibrator.cpp"],
export_include_dirs: ["."],
- proprietary: true,
visibility: [":__subpackages__"],
}
+cc_library {
+ name: "android.hardware.vibrator-impl_vendor.bramble",
+ defaults: ["VibratorHalDrv2624BinaryDefaultsBramble"],
+ srcs: ["Vibrator.cpp"],
+ export_include_dirs: ["."],
+ proprietary: true,
+}
+
cc_binary {
name: "android.hardware.vibrator-service.bramble",
defaults: ["VibratorHalDrv2624BinaryDefaultsBramble"],
init_rc: ["android.hardware.vibrator-service.bramble.rc"],
vintf_fragments: ["android.hardware.vibrator-service.bramble.xml"],
srcs: ["service.cpp"],
- static_libs: ["android.hardware.vibrator-impl.bramble"],
+ static_libs: ["android.hardware.vibrator-impl_vendor.bramble"],
proprietary: true,
}
diff --git a/vibrator/drv2624/bench/Android.bp b/vibrator/drv2624/bench/Android.bp
index 0db978c..bab4656 100644
--- a/vibrator/drv2624/bench/Android.bp
+++ b/vibrator/drv2624/bench/Android.bp
@@ -13,3 +13,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+cc_benchmark {
+ name: "VibratorHalDrv2624BenchmarkBramble",
+ defaults: ["VibratorHalDrv2624TestDefaultsBramble"],
+ srcs: [
+ "benchmark.cpp",
+ ],
+ static_libs: [
+ "libc++fs",
+ ],
+ shared_libs: [
+ "libbase",
+ ],
+ // TODO(b/135767253): Remove when fixed.
+ test_suites: ["device-tests"],
+ // TODO(b/142024316): Remove when fixed.
+ require_root: true,
+}
diff --git a/vibrator/drv2624/tests/Android.bp b/vibrator/drv2624/tests/Android.bp
index 0db978c..0179950 100644
--- a/vibrator/drv2624/tests/Android.bp
+++ b/vibrator/drv2624/tests/Android.bp
@@ -13,3 +13,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+cc_test {
+ name: "VibratorHalDrv2624TestSuiteBramble",
+ defaults: ["VibratorHalDrv2624TestDefaultsBramble"],
+ srcs: [
+ "test-hwapi.cpp",
+ "test-hwcal.cpp",
+ "test-vibrator.cpp",
+ ],
+ static_libs: [
+ "libc++fs",
+ "libgmock",
+ ],
+ shared_libs: [
+ "libbase",
+ ],
+}