Updates tests and fake subhals to support Multi-HAL 2.1 to make
on-device testing feasible.
Bug: 149758467
Test: Verify that the new unit tests and subhals in this topic load and
run on a Pixel device
Change-Id: I2be51568ba8dd99aa0588b8945d3d41bda7d9941
Unit tests were depending on a non test library unecesarrily and it was
causing unit test build failure.
Fixes: 155239061
Test: atest android.hardware.sensors@2.0-halproxy-unit-tests
Change-Id: I057a432fdbef93680a67558c27ed7adc7fedfbbc
Bug: 149758467
Test: Verify that the new unit tests and subhals in this topic load and
run on a Pixel device
Change-Id: Id5ab7b606f91764a456d8e3a16f7f0f2cf9b4fef
Bug: 149758467
Test: Load onto device and verify VTS passes
Test: Verify new fake subhals load properly and that unit tests pass
that have been updated in this topic
Change-Id: Icefae8c1261b29d704beedd51de5b3f53b374cc4
The sensor reading thread continues producing
event and refers to the already destroyed
callback object which causes a crash in
SensorsHidlEnvironmentBase::addEvent.
Bug: 153754380
Test: atest VtsHalSensorsV2_0TargetTest
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Id7fb72c42dc67f89ceef93d937241e1584b853e7
A -1 sensorHandle value is used to denote all active sensors should be
stopped for a given channel. Make sure the multi-HAL code doesn't modify
handles of this value or it'll corrupt them before passing to the direct
channel sub-HAL.
Bug: 153413565
Test: atest VtsHalSensorsV2_0Target
Change-Id: I3fe9cbf4661aa3db4ff534765d5112a193b7bf4a
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.
Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
Sensors Multi-HAL 2.0 will soon have a shared implementation for both
Sensors HAL 2.0 and 2.1 and moving the files to the common directory
first will minimize the diff in upcoming CLs.
Bug: 149758467
Test: compile
Change-Id: I15f84a7aaa302d83d4f4b1ffe357f515e36d6382
Unit tests do not currently build because they cannot find the
ScopedWakelock shared object. Make a test library version of
ScopedWakelock for them.
Bug: 147912609
Test: Build and run atest android.hardware.sensors@2.0-halproxy-unit-tests
Merged-In: Ie8d3eb606ccba3825be2c8102b9a7bc6ea033f65
Change-Id: Ie8d3eb606ccba3825be2c8102b9a7bc6ea033f65
HAL 1.0 VTS tests need to detach the polling thread or it will never
exit on its own. Additionally, the poll() methods return status needs to
be checked or HIDL will assert and cause the program to crash.
Bug: 150475314
Test: atest VtsHalSensorsV1_0TargetTest VtsHalSensorsV2_0TargetTest
Change-Id: I626b7aa064a1f258c968d1787872b9c67786dede
Since Sensors HAL 2.1 implementations need to run VTS for both HAL 2.0
and 2.1, move tests that don't differ in logic between the two HAL
implementations to the VTS for 2.0 only to minimize the total run time
for both suites.
Bug: 149927057
Test: atest VtsHalSensorsV2_0Target VtsHalSensorsV2_1Target
Change-Id: I5213cdf05bafb2d4014078a03b22d98b96b7c5ee
Dependencies don't use cflags set by code that depends on them so the
VTS test for HAL 2.1 wasn't properly pulling the 2.1 interface when
present on the device (it was using the 2.0 interface). Modify the
Android.bp files to define the right flags depending on whether we're
testing HAL 2.0 or 2.1.
Bug: 149759782
Test: atest VtsHalSensorsV2_0TargetTest VtsHalSensorsV2_1TargetTest
Change-Id: I3533b6c244e767a8defe0a44a14025fdeb8eeeba
Create a default implementation of HAL 2.1 that shares 90% of the
underlying code with HAL 2.0 since the interfaces are very similar.
Bug: 144139857
Test: compile
Change-Id: Ic6b139df98ddb1f92833b1f2d65e1cecc297fd41
Creates a wrapper that makes a 2.0 sensor HAL appear to look like a 2.1
sensor HAL so that various pieces of code can be shared between the two
implementations.
Bug: 144139857
Test: Run VTS
Change-Id: I4ee4fd2b900e5d4ca744f420f69e150ba38f7949
Creates Sensors HAL 2.1 to support the addition of a new sensor type for
hinge angle sensors.
Bug: 144139857
Test: mma
Change-Id: Id78fb16324d28f2291b3ad1950197bfd2632d6f4
There are two ALOG_ASSERT calls in the HalProxyCallback::postEvents
method that do not have the correct format specifier types. This causes
a build error if you try to build with debug logs.
Test: Build and load onto device
Change-Id: I793b6fcd72dd13b07422af0e292a373a66b2c200