Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b210106 authored by Mark Salyzyn's avatar Mark Salyzyn Committed by android-build-merger
Browse files

Merge "bootstat: test: add error propagation for fastboot format userdata" am: 7de02203

am: a4e1f243

Change-Id: I50d565b0e4a6bd5e0e8e59d313ef0d2c985666a1
parents ca874f3e a4e1f243
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -241,7 +241,8 @@ EXPECT_EQ() {

[ "USAGE: EXPECT_PROPERTY <prop> <value> [--allow_failure]

Returns true if current return (regex) value is true and the result matches" ]
Returns true (0) if current return (regex) value is true and the result matches
and the incoming return value is true as well (wired-or)" ]
EXPECT_PROPERTY() {
  save_ret=${?}
  property="${1}"
@@ -628,8 +629,13 @@ test_optional_factory_reset() {
    adb reboot-bootloader
  fi
  fastboot format userdata >&2
  save_ret=${?}
  if [ 0 != ${save_ret} ]; then
    echo "ERROR: fastboot can not format userdata" >&2
  fi
  fastboot reboot >&2
  wait_for_screen
  ( exit ${save_ret} )  # because one can not just do ?=${save_ret}
  EXPECT_PROPERTY sys.boot.reason reboot,factory_reset
  EXPECT_PROPERTY persist.sys.boot.reason ""
  report_bootstat_logs reboot,factory_reset bootloader \