summaryrefslogtreecommitdiffstats
path: root/tests/component/update_verifier_test.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-04-19 02:10:49 +0200
committerTao Bao <tbao@google.com>2018-04-20 23:26:38 +0200
commit1cc03519155fc333b7db6c90c4d82f70c246997a (patch)
tree7ff841a4b1598550c3129b14f5c917ef891ff55a /tests/component/update_verifier_test.cpp
parentMerge "applypatch: Drop the SHA_CTX parameter in Apply{BSDiff,Image}Patch." (diff)
downloadandroid_bootable_recovery-1cc03519155fc333b7db6c90c4d82f70c246997a.tar
android_bootable_recovery-1cc03519155fc333b7db6c90c4d82f70c246997a.tar.gz
android_bootable_recovery-1cc03519155fc333b7db6c90c4d82f70c246997a.tar.bz2
android_bootable_recovery-1cc03519155fc333b7db6c90c4d82f70c246997a.tar.lz
android_bootable_recovery-1cc03519155fc333b7db6c90c4d82f70c246997a.tar.xz
android_bootable_recovery-1cc03519155fc333b7db6c90c4d82f70c246997a.tar.zst
android_bootable_recovery-1cc03519155fc333b7db6c90c4d82f70c246997a.zip
Diffstat (limited to 'tests/component/update_verifier_test.cpp')
-rw-r--r--tests/component/update_verifier_test.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/component/update_verifier_test.cpp b/tests/component/update_verifier_test.cpp
index 1544bb2a4..f6ef6dcfd 100644
--- a/tests/component/update_verifier_test.cpp
+++ b/tests/component/update_verifier_test.cpp
@@ -17,6 +17,8 @@
#include <string>
#include <android-base/file.h>
+#include <android-base/properties.h>
+#include <android-base/strings.h>
#include <android-base/test_utils.h>
#include <gtest/gtest.h>
#include <update_verifier/update_verifier.h>
@@ -24,11 +26,8 @@
class UpdateVerifierTest : public ::testing::Test {
protected:
void SetUp() override {
-#if defined(PRODUCT_SUPPORTS_VERITY) || defined(BOARD_AVB_ENABLE)
- verity_supported = true;
-#else
- verity_supported = false;
-#endif
+ std::string verity_mode = android::base::GetProperty("ro.boot.veritymode", "");
+ verity_supported = android::base::EqualsIgnoreCase(verity_mode, "enforcing");
}
bool verity_supported;