Merge "Check userspace snapshots only for API level >= T"
This commit is contained in:
commit
ff3fdf36ef
1 changed files with 7 additions and 0 deletions
|
|
@ -17,7 +17,14 @@
|
||||||
#include <android-base/properties.h>
|
#include <android-base/properties.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
static int GetVsrLevel() {
|
||||||
|
return android::base::GetIntProperty("ro.vendor.api_level", -1);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(VAB, Enabled) {
|
TEST(VAB, Enabled) {
|
||||||
ASSERT_TRUE(android::base::GetBoolProperty("ro.virtual_ab.enabled", false));
|
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));
|
ASSERT_TRUE(android::base::GetBoolProperty("ro.virtual_ab.userspace.snapshots.enabled", false));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue