Add capability check for satellite blacklist tests

Bug: 166251991
Test: on device
Change-Id: I27e515a5f2a6676a250f361b17b056a73e209ad3
This commit is contained in:
Yu-Han Yang 2020-08-26 13:38:40 -07:00
parent a6cc5825e9
commit c40aa186ea

View file

@ -363,6 +363,12 @@ IGnssConfiguration::BlacklistedSource FindStrongFrequentNonGpsSource(
* formerly strongest satellite
*/
TEST_P(GnssHalTest, BlacklistIndividualSatellites) {
if (!(gnss_cb_->last_capabilities_ & IGnssCallback_2_1::Capabilities::SATELLITE_BLACKLIST)) {
ALOGI("Test BlacklistIndividualSatellites skipped. SATELLITE_BLACKLIST capability not "
"supported.");
return;
}
const int kLocationsToAwait = 3;
const int kRetriesToUnBlacklist = 10;
@ -504,6 +510,12 @@ TEST_P(GnssHalTest, BlacklistIndividualSatellites) {
* 4a & b) Clean up by turning off location, and send in empty blacklist.
*/
TEST_P(GnssHalTest, BlacklistConstellationLocationOff) {
if (!(gnss_cb_->last_capabilities_ & IGnssCallback_2_1::Capabilities::SATELLITE_BLACKLIST)) {
ALOGI("Test BlacklistConstellationLocationOff skipped. SATELLITE_BLACKLIST capability not "
"supported.");
return;
}
const int kLocationsToAwait = 3;
const int kGnssSvInfoListTimeout = 2;
@ -580,6 +592,12 @@ TEST_P(GnssHalTest, BlacklistConstellationLocationOff) {
* 4a & b) Clean up by turning off location, and send in empty blacklist.
*/
TEST_P(GnssHalTest, BlacklistConstellationLocationOn) {
if (!(gnss_cb_->last_capabilities_ & IGnssCallback_2_1::Capabilities::SATELLITE_BLACKLIST)) {
ALOGI("Test BlacklistConstellationLocationOn skipped. SATELLITE_BLACKLIST capability not "
"supported.");
return;
}
const int kLocationsToAwait = 3;
const int kGnssSvInfoListTimeout = 2;