From 45a15ed8b972eb3faa7a0af9ce18b42c3d77387e Mon Sep 17 00:00:00 2001 From: AOYAGI Takako Date: Tue, 14 Mar 2023 09:48:44 +0900 Subject: [PATCH] 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 --- sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h index 03ef1b8c88..38e69c0f0e 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, CallInitializeTwice) { } TEST_P(SensorsHidlTest, CleanupConnectionsOnInitialize) { + if (getSensorsList().size() == 0) { + // No sensors + return; + } + activateAllSensors(true); // Verify that events are received