Skip TestGnssPowerIndication if capability is not supported

Bug: 263354944
Test: atest VtsHalGnssTargetTest
Change-Id: I372ca2f2fb4cb5d4cafbacc1bde1cc0f0f2077dd
This commit is contained in:
Yu-Han Yang
2023-01-20 22:08:53 +00:00
parent 2f27d9e80c
commit 5da610c660

View File

@@ -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();