diff options
author | Tao Bao <tbao@google.com> | 2018-04-24 00:42:01 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-04-24 00:42:01 +0200 |
commit | abcac8e1e71c0f34536ee51cf1bf8f0244cc21c9 (patch) | |
tree | 7ff841a4b1598550c3129b14f5c917ef891ff55a /tests | |
parent | Merge "applypatch: Drop the SHA_CTX parameter in Apply{BSDiff,Image}Patch." (diff) | |
parent | Merge "Make update_verifier generic across verified boot versions." (diff) | |
download | android_bootable_recovery-abcac8e1e71c0f34536ee51cf1bf8f0244cc21c9.tar android_bootable_recovery-abcac8e1e71c0f34536ee51cf1bf8f0244cc21c9.tar.gz android_bootable_recovery-abcac8e1e71c0f34536ee51cf1bf8f0244cc21c9.tar.bz2 android_bootable_recovery-abcac8e1e71c0f34536ee51cf1bf8f0244cc21c9.tar.lz android_bootable_recovery-abcac8e1e71c0f34536ee51cf1bf8f0244cc21c9.tar.xz android_bootable_recovery-abcac8e1e71c0f34536ee51cf1bf8f0244cc21c9.tar.zst android_bootable_recovery-abcac8e1e71c0f34536ee51cf1bf8f0244cc21c9.zip |
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Android.mk | 8 | ||||
-rw-r--r-- | tests/component/update_verifier_test.cpp | 9 |
2 files changed, 4 insertions, 13 deletions
diff --git a/tests/Android.mk b/tests/Android.mk index b29ff50f6..fd4497858 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -74,14 +74,6 @@ ifeq ($(AB_OTA_UPDATER),true) LOCAL_CFLAGS += -DAB_OTA_UPDATER=1 endif -ifeq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY),true) -LOCAL_CFLAGS += -DPRODUCT_SUPPORTS_VERITY=1 -endif - -ifeq ($(BOARD_AVB_ENABLE),true) -LOCAL_CFLAGS += -DBOARD_AVB_ENABLE=1 -endif - LOCAL_MODULE := recovery_component_test LOCAL_COMPATIBILITY_SUITE := device-tests LOCAL_C_INCLUDES := bootable/recovery 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; |