diff options
Diffstat (limited to 'tests/component/update_verifier_test.cpp')
-rw-r--r-- | tests/component/update_verifier_test.cpp | 9 |
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; |