Merge "bootstat: battery test fails on QC devices"
This commit is contained in:
commit
834e89c25a
1 changed files with 13 additions and 6 deletions
|
|
@ -477,7 +477,7 @@ test_hard() {
|
||||||
[ "USAGE: test_battery
|
[ "USAGE: test_battery
|
||||||
|
|
||||||
battery test (trick):
|
battery test (trick):
|
||||||
- echo healthd: battery l=2 | adb shell su root tee /dev/kmsg ; adb reboot warm
|
- echo healthd: battery l=2 | adb shell su root tee /dev/kmsg ; adb reboot cold
|
||||||
- (wait until screen is up, boot has completed)
|
- (wait until screen is up, boot has completed)
|
||||||
- adb shell getprop sys.boot.reason
|
- adb shell getprop sys.boot.reason
|
||||||
- NB: should report reboot,battery, unless healthd managed to log
|
- NB: should report reboot,battery, unless healthd managed to log
|
||||||
|
|
@ -498,8 +498,12 @@ battery test (trick):
|
||||||
- (replace set logd.kernel true to the above, and retry test)" ]
|
- (replace set logd.kernel true to the above, and retry test)" ]
|
||||||
test_battery() {
|
test_battery() {
|
||||||
echo "INFO: expected duration of ${TEST} test roughly two minutes" >&2
|
echo "INFO: expected duration of ${TEST} test roughly two minutes" >&2
|
||||||
echo healthd: battery l=2 | adb shell su root tee /dev/kmsg >/dev/null
|
# Send it _many_ times to combat devices with flakey pstore
|
||||||
adb reboot warm >&2
|
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z; do
|
||||||
|
echo healthd: battery l=2 | adb shell su root tee /dev/kmsg >/dev/null
|
||||||
|
done
|
||||||
|
adb reboot cold >&2
|
||||||
|
adb wait-for-device
|
||||||
wait_for_screen
|
wait_for_screen
|
||||||
adb shell su root \
|
adb shell su root \
|
||||||
cat /proc/fs/pstore/console-ramoops \
|
cat /proc/fs/pstore/console-ramoops \
|
||||||
|
|
@ -509,14 +513,17 @@ test_battery() {
|
||||||
grep 'healthd: battery l=2' >/dev/null || (
|
grep 'healthd: battery l=2' >/dev/null || (
|
||||||
if ! EXPECT_PROPERTY sys.boot.reason reboot,battery >/dev/null 2>/dev/null; then
|
if ! EXPECT_PROPERTY sys.boot.reason reboot,battery >/dev/null 2>/dev/null; then
|
||||||
# retry
|
# retry
|
||||||
echo healthd: battery l=2 | adb shell su root tee /dev/kmsg >/dev/null
|
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z; do
|
||||||
adb reboot warm >&2
|
echo healthd: battery l=2 | adb shell su root tee /dev/kmsg >/dev/null
|
||||||
|
done
|
||||||
|
adb reboot cold >&2
|
||||||
|
adb wait-for-device
|
||||||
wait_for_screen
|
wait_for_screen
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
EXPECT_PROPERTY sys.boot.reason shutdown,battery
|
EXPECT_PROPERTY sys.boot.reason shutdown,battery
|
||||||
EXPECT_PROPERTY persist.sys.boot.reason reboot,warm
|
EXPECT_PROPERTY persist.sys.boot.reason reboot,cold
|
||||||
report_bootstat_logs shutdown,battery "-bootstat: Battery level at shutdown 2%"
|
report_bootstat_logs shutdown,battery "-bootstat: Battery level at shutdown 2%"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue