Skip GnssMeasurement VTS for Android Automotive OS.
According to the Q CDD, an Android Automotive OS device is not required
to support GnssMeasurements.
Bug: 161549048
Test: atest VtsHalGnssV1_0TargetTest VtsHalGnssV2_0TargetTest VtsHalGnssV2_1TargetTest
Change-Id: Idcd59f36ca2ea28925f6766a7abcdf7b6ad0f0ff
diff --git a/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp b/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
index 97e7c27..237e8ec 100644
--- a/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
+++ b/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
@@ -39,6 +39,10 @@
using android::hardware::gnss::V1_0::IGnssMeasurement;
using android::sp;
+/*
+ * Since Utils.cpp depends on Gnss Hal 2.0, the tests for Gnss Hal 1.0 will use
+ * there own version of IsAutomotiveDevice() instead of the common version.
+ */
static bool IsAutomotiveDevice() {
char buffer[PROPERTY_VALUE_MAX] = {0};
property_get("ro.hardware.type", buffer, "");
@@ -492,9 +496,9 @@
* Verifies that modern hardware supports measurement capabilities.
*/
TEST_P(GnssHalTest, MeasurementCapabilites) {
- if (info_called_count_ > 0 && last_info_.yearOfHw >= 2016) {
- EXPECT_TRUE(last_capabilities_ & IGnssCallback::Capabilities::MEASUREMENTS);
- }
+ if (!IsAutomotiveDevice() && info_called_count_ > 0 && last_info_.yearOfHw >= 2016) {
+ EXPECT_TRUE(last_capabilities_ & IGnssCallback::Capabilities::MEASUREMENTS);
+ }
}
/*
@@ -529,4 +533,4 @@
}
return RUN_ALL_TESTS();
-}
\ No newline at end of file
+}