From f6d8a631fa2e26802e4c88bf0d35480548dcf324 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Wed, 24 Jul 2019 15:24:28 -0700 Subject: [PATCH] adb-remount-test: support devices that do not have verity This allows the test to run to completion on cuttlefish Test: adb-remount-test.sh Bug: 138649540 Change-Id: Ief00af72af94bf14c1d69499b12ece8cfce2f552 --- fs_mgr/tests/adb-remount-test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs_mgr/tests/adb-remount-test.sh b/fs_mgr/tests/adb-remount-test.sh index dbcb4299c..7f84bb8a8 100755 --- a/fs_mgr/tests/adb-remount-test.sh +++ b/fs_mgr/tests/adb-remount-test.sh @@ -1425,7 +1425,7 @@ check_eq "cat: /system/hello: No such file or directory" "${B}" after rm B="`adb_cat /vendor/hello`" check_eq "cat: /vendor/hello: No such file or directory" "${B}" after rm -if [ -n "${scratch_partition}" ]; then +if ${is_bootloader_fastboot} && [ -n "${scratch_partition}" ]; then echo "${GREEN}[ RUN ]${NORMAL} test fastboot flash to ${scratch_partition} recovery" >&2 @@ -1567,7 +1567,9 @@ if ${overlayfs_supported}; then adb_wait ${ADB_WAIT} || die "adb remount -R" if [ "orange" != "`get_property ro.boot.verifiedbootstate`" -o \ - "2" = "`get_property partition.system.verified`" ]; then + "2" = "`get_property partition.system.verified`" ] && + [ -n "`get_property ro.boot.verifiedbootstate`" -o \ + -n "`get_property partition.system.verified`" ]; then die "remount -R command failed to disable verity" fi