From 5da610c66019557ac9e5c0e740d5ac35b9e02aee Mon Sep 17 00:00:00 2001 From: Yu-Han Yang Date: Fri, 20 Jan 2023 22:08:53 +0000 Subject: [PATCH] Skip TestGnssPowerIndication if capability is not supported Bug: 263354944 Test: atest VtsHalGnssTargetTest Change-Id: I372ca2f2fb4cb5d4cafbacc1bde1cc0f0f2077dd --- gnss/aidl/vts/gnss_hal_test_cases.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnss/aidl/vts/gnss_hal_test_cases.cpp b/gnss/aidl/vts/gnss_hal_test_cases.cpp index 3696233d3b..c7fc32aaee 100644 --- a/gnss/aidl/vts/gnss_hal_test_cases.cpp +++ b/gnss/aidl/vts/gnss_hal_test_cases.cpp @@ -526,6 +526,11 @@ TEST_P(GnssHalTest, TestGnssPowerIndication) { EXPECT_EQ(gnssPowerIndicationCallback->capabilities_cbq_.calledCount(), 1); + if (gnssPowerIndicationCallback->last_capabilities_ == 0) { + // Skipping the test since GnssPowerIndication is not supported. + return; + } + // Request and verify a GnssPowerStats is received gnssPowerIndicationCallback->gnss_power_stats_cbq_.reset(); iGnssPowerIndication->requestGnssPowerStats();