aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Zeuthen2017-05-08 12:41:28 -0500
committerDavid Zeuthen2017-05-24 13:14:11 -0500
commit8ed9738b62b075205a81489b01ec882520da183a (patch)
tree6944d37189d4e8d6bf1515d9d93742113ec99997 /tests
parent1f9808bd4856122924c9453d871d34fd777d5389 (diff)
downloadplatform-bootable-recovery-8ed9738b62b075205a81489b01ec882520da183a.tar.gz
platform-bootable-recovery-8ed9738b62b075205a81489b01ec882520da183a.tar.xz
platform-bootable-recovery-8ed9738b62b075205a81489b01ec882520da183a.zip
update_verifier: Support AVB.
When using AVB, PRODUCT_SUPPORTS_VERITY is not set so check for BOARD_ENABLE_AVB as well. Also AVB sets up the root filesystem as 'vroot' so map that to 'system' since this is what is expected. Managed to test at least that the code is at least compiled in: $ fastboot --set-active=_a Setting current slot to 'a'... OKAY [ 0.023s] finished. total time: 0.023s $ fastboot reboot rebooting... finished. total time: 0.050s $ adb wait-for-device $ adb logcat |grep update_verifier 03-04 05:28:56.773 630 630 I /system/bin/update_verifier: Started with arg 1: nonencrypted 03-04 05:28:56.776 630 630 I /system/bin/update_verifier: Booting slot 0: isSlotMarkedSuccessful=0 03-04 05:28:56.776 630 630 W /system/bin/update_verifier: Failed to open /data/ota_package/care_map.txt: No such file or directory 03-04 05:28:56.788 630 630 I /system/bin/update_verifier: Marked slot 0 as booted successfully. 03-04 05:28:56.788 630 630 I /system/bin/update_verifier: Leaving update_verifier. Bug: None Test: Manually tested on device using AVB bootloader. Change-Id: I13c0fe1cc5d0f397e36f5e62fcc05c8dfee5fd85
Diffstat (limited to 'tests')
-rw-r--r--tests/Android.mk4
-rw-r--r--tests/component/update_verifier_test.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/Android.mk b/tests/Android.mk
index 02a24012..4ee59b52 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -93,6 +93,10 @@ ifeq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY),true)
93LOCAL_CFLAGS += -DPRODUCT_SUPPORTS_VERITY=1 93LOCAL_CFLAGS += -DPRODUCT_SUPPORTS_VERITY=1
94endif 94endif
95 95
96ifeq ($(BOARD_AVB_ENABLE),true)
97LOCAL_CFLAGS += -DBOARD_AVB_ENABLE=1
98endif
99
96LOCAL_MODULE := recovery_component_test 100LOCAL_MODULE := recovery_component_test
97LOCAL_COMPATIBILITY_SUITE := device-tests 101LOCAL_COMPATIBILITY_SUITE := device-tests
98LOCAL_C_INCLUDES := bootable/recovery 102LOCAL_C_INCLUDES := bootable/recovery
diff --git a/tests/component/update_verifier_test.cpp b/tests/component/update_verifier_test.cpp
index 73b4478a..5fc7ef63 100644
--- a/tests/component/update_verifier_test.cpp
+++ b/tests/component/update_verifier_test.cpp
@@ -24,7 +24,7 @@
24class UpdateVerifierTest : public ::testing::Test { 24class UpdateVerifierTest : public ::testing::Test {
25 protected: 25 protected:
26 void SetUp() override { 26 void SetUp() override {
27#ifdef PRODUCT_SUPPORTS_VERITY 27#if defined(PRODUCT_SUPPORTS_VERITY) || defined(BOARD_AVB_ENABLE)
28 verity_supported = true; 28 verity_supported = true;
29#else 29#else
30 verity_supported = false; 30 verity_supported = false;