Fix for VTS test CleanupConnectionsOnInitialize Sensor event never occur on DUT that has no sensor. So, skip this test case on DUT that has no sensor. Test: run vts -m VtsHalSensorsV2_0TargetTest Bug: 273383821 Change-Id: I657b74ca3c67c105e40e58a7e4c700370a9db3e3 Signed-off-by: AOYAGI Takako <aoyagi.takako@jp.panasonic.com>
diff --git a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h index 03ef1b8..38e69c0 100644 --- a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h +++ b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
@@ -549,6 +549,11 @@ } TEST_P(SensorsHidlTest, CleanupConnectionsOnInitialize) { + if (getSensorsList().size() == 0) { + // No sensors + return; + } + activateAllSensors(true); // Verify that events are received