diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-10-26 11:29:11 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-01 21:00:28 +0000 |
commit | 4fbecddd847e7adffff8843cdf93f4c68f44309a (patch) | |
tree | 482b8f34ca48d94f2cee737755c091f3959b852f /power | |
parent | bafcc352e44498bde12a80da2c993ff7a6343047 (diff) | |
download | chrome-ec-4fbecddd847e7adffff8843cdf93f4c68f44309a.tar.gz |
zephyr: Bring qcom.c test coverage to 100%
Test the final lines in qcom.c.
Make battery_is_present() test mockable.
Change gpio_pmic_resin_l to be input|output so that it can be read. The
gpio_emul is strict and doesn't allow reading output gpios.
Add gpio_switchcap_pg, instead of using the output gpio as the input
power-good-pin.
Remove most all of the gpio device pointers, since all the gpios are on
the same port.
test_chipset_reset_success stopped working because the callback on
pmic_resin_l wasn't getting called. Set the interrupt flags to fix.
In test_power_button wait to set power_good until after pmic_kpd_pwr_odl
is set. This is slightly more realistic.
Add 2 more failures cases in power on sequence.
Exclude an unreachable line from lcov.
BRANCH=None
BUG=None
TEST=./twister
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: Ie38f53addfbc745e046f017f322dada4486405ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3994229
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'power')
-rw-r--r-- | power/qcom.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/power/qcom.c b/power/qcom.c index 30374cd330..eba2d32442 100644 --- a/power/qcom.c +++ b/power/qcom.c @@ -1139,7 +1139,6 @@ test_mockable enum power_state power_handle_state(enum power_state state) default: CPRINTS("Unexpected power state %d", state); ASSERT(0); - break; } return state; |