Check userspace snapshots only for API level >= T

Skip checking for userspace snapshots enabled property
for API level < T as this feature is not applicable for
GRF targets.

Bug: 236450435
Test: vts_ota_config_test
Change-Id: Ib5083f6237cdf4962aae06f166811d67cf6c385e
This commit is contained in:
Benergy Meenan Ravuri 2022-07-05 15:50:08 +05:30 committed by P.Adarsh Reddy
parent 827389c9a4
commit 7680c29bc9

View file

@ -17,7 +17,14 @@
#include <android-base/properties.h>
#include <gtest/gtest.h>
static int GetVsrLevel() {
return android::base::GetIntProperty("ro.vendor.api_level", -1);
}
TEST(VAB, Enabled) {
ASSERT_TRUE(android::base::GetBoolProperty("ro.virtual_ab.enabled", false));
if (GetVsrLevel() < __ANDROID_API_T__) {
GTEST_SKIP();
}
ASSERT_TRUE(android::base::GetBoolProperty("ro.virtual_ab.userspace.snapshots.enabled", false));
}