platform_system_core/bootstat/bootstat-debug.rc
Mark Salyzyn 9a3870490a bootstat: test: inject ro.boot.bootreason values
Adding a set of automated engineering unit tests with a strict list of
prerequisites.  Not meant for "user" builds.  Must have a crafted
bootloader that does not set the boot reason.  Only works on platforms
where the bootloader either by accident or specifically does not set
the ro.boot.bootreason via kernel command line configuration
androidboot.bootreason=.  If the tests do not have the prerequisites,
the test will report success, but with protest.

These new tests should work on current Hikey and Hikey960 bootloaders
but could very well become obsolete if those platform bootloaders
start setting the boot reason.

We do not want a platform solution as it could allow a third party to
override the bootloader boot reason.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I1793184a8484b83e1d9077475bc65af9816dadf7
2017-10-11 13:48:33 -07:00

7 lines
322 B
Text

# This file is the userdebug LOCAL_INIT_RC file for the bootstat command.
# FOR TESTING
# For devices w/o bootloader boot reason reported, mirror test boot reason
# to bootloader boot reason to allow test to inject reasons
on property:persist.test.boot.reason=*
setprop ro.boot.bootreason ${persist.test.boot.reason}