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

Commit 5b2d0987 authored by Mark Salyzyn's avatar Mark Salyzyn Committed by Gerrit Code Review
Browse files

Merge changes I30d6b530,Ie2e5872a,I313cfef2,I87dfb6a0,I70709ba5

* changes:
  bootstat: add shutdown,thermal,battery
  bootstat: add reboot,2sec
  bootstat: test: check ro.boot.bootreason in some tests
  bootstat: fix test regression (exec_background)
  bootstat: fix test regression (extra logging)
parents 41a9b3c8 c89f9da0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -194,10 +194,12 @@ wait_for_screen() {
              sed -n 's/[[]sys[.]\(boot_completed\|logbootcomplete\)[]]: [[]\([01]\)[]]$/\1=\2/p'`
        if [ "${vals}" = "`echo boot_completed=1 ; echo logbootcomplete=1`" ]
        then
          sleep 1
          break
        fi
        if [ "${vals}" = "`echo logbootcomplete=1 ; echo boot_completed=1`" ]
        then
          sleep 1
          break
        fi
      fi
@@ -287,6 +289,7 @@ bootstat: Service started: /system/bin/bootstat -l
bootstat: Battery level at shutdown 100%
bootstat: Battery level at startup 100%
init    : Parsing file /system/etc/init/bootstat.rc...
init    : Parsing file /system/etc/init/bootstat-debug.rc...
init    : processing action (persist.test.boot.reason=*) from (/system/etc/init/bootstat-debug.rc:
init    : Command 'setprop ro.boot.bootreason \${persist.test.boot.reason}' action=persist.test.boot.reason=* (/system/etc/init/bootstat-debug.rc:
init    : processing action (post-fs-data) from (/system/etc/init/bootstat.rc
@@ -566,6 +569,8 @@ blind_reboot_test() {
  esac
  adb reboot ${TEST}
  wait_for_screen
  bootloader_reason=`validate_property ro.boot.bootreason`
  EXPECT_PROPERTY ro.boot.bootreason ${bootloader_reason}
  EXPECT_PROPERTY sys.boot.reason ${reason}
  EXPECT_PROPERTY persist.sys.boot.reason ${reason}
  report_bootstat_logs ${reason}
+3 −0
Original line number Diff line number Diff line
@@ -223,6 +223,8 @@ const std::map<std::string, int32_t> kBootReasonMap = {
    {"2sec_reboot", 83},
    {"reboot,by_key", 84},
    {"reboot,longkey", 85},
    {"reboot,2sec", 86},
    {"shutdown,thermal,battery", 87},
};

// Converts a string value representing the reason the system booted to an
@@ -406,6 +408,7 @@ std::string BootReasonStrToReason(const std::string& boot_reason) {
        {"shutdown,thermal", "thermal"},
        {"warm,s3_wakeup", "s3_wakeup"},
        {"hard,hw_reset", "hw_reset"},
        {"reboot,2sec", "2sec_reboot"},
        {"bootloader", ""},
    };