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

Commit cd7e1222 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

bootstat: test reboot rescueparty

This test fails on most devices, gives us a report of devices that
do not propagate the boot reason via the bootloader.  This should
become a bootloader required test.

Test: boot_reason_test.sh optional_rescueparty
Change-Id: Ibdc7b23b025e5d89d659ff08083b2e071343923c
parent 48cf760b
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -312,6 +312,7 @@ init : processing action (boot) from (/system/etc/init/bootstat.rc
init    : processing action (ro.boot.bootreason=*) from (/system/etc/init/bootstat.rc
init    : processing action (sys.boot_completed=1 && sys.logbootcomplete=1) from (/system/etc/init/bootstat.rc
 (/system/bin/bootstat --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l)'
 (/system/bin/bootstat --set_system_boot_reason --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l)'
 (/system/bin/bootstat -r post_decrypt_time_elapsed)'
init    : Command 'exec - system log -- /system/bin/bootstat --record_boot_complete' action=sys.boot_completed=1 && sys.logbootcomplete=1 (/system/etc/init/bootstat.rc:
init    : Command 'exec - system log -- /system/bin/bootstat --record_boot_reason' action=sys.boot_completed=1 && sys.logbootcomplete=1 (/system/etc/init/bootstat.rc:
@@ -582,9 +583,9 @@ blind_reboot_test() {
  duration_test
  case ${TEST} in
    bootloader | recovery | cold | hard | warm ) reason=${TEST} ;;
    *)                                           reason=reboot,${TEST} ;;
    *)                                           reason=reboot,${TEST#optional_} ;;
  esac
  adb reboot ${TEST}
  adb reboot ${TEST#optional_}
  wait_for_screen
  bootloader_reason=`validate_property ro.boot.bootreason`
  EXPECT_PROPERTY ro.boot.bootreason ${bootloader_reason}
@@ -948,6 +949,20 @@ test_adb_reboot() {
  report_bootstat_logs reboot,adb
}

[ "USAGE: test_rescueparty

rescueparty test
- adb reboot rescueparty
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- adb shell getprop ro.boot.bootreason
- NB: should report reboot,rescueparty" ]
test_optional_rescueparty() {
  blind_reboot_test
  echo "WARNING: legacy devices are allowed to fail following ro.boot.bootreason result" >&2
  EXPECT_PROPERTY ro.boot.bootreason reboot,rescueparty
}

[ "USAGE: test_Its_Just_So_Hard_reboot

Its Just So Hard reboot test: