summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenergy Meenan Ravuri <quic_bravuri@quicinc.com>2022-07-05 15:50:08 +0530
committerAkilesh Kailash <akailash@google.com>2022-07-12 17:57:59 +0000
commit9591090a17148d01a803072e2a93bd994d797cae (patch)
tree2acdf6b9b473b58a10dfc4e0cc62073b3a6dc519
parent299717115eb2bce20c5b74346903ed39eaaef675 (diff)
downloadcore-9591090a17148d01a803072e2a93bd994d797cae.tar.gz
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 Ignore-AOSP-First: already present in aosp/master
-rw-r--r--fs_mgr/libsnapshot/vts_ota_config_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs_mgr/libsnapshot/vts_ota_config_test.cpp b/fs_mgr/libsnapshot/vts_ota_config_test.cpp
index afc2d81a4..02bcc3438 100644
--- a/fs_mgr/libsnapshot/vts_ota_config_test.cpp
+++ b/fs_mgr/libsnapshot/vts_ota_config_test.cpp
@@ -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));
}