diff options
-rw-r--r-- | zephyr/test/drivers/common/src/utils.c | 7 | ||||
-rw-r--r-- | zephyr/test/drivers/default/src/virtual_battery.c | 10 |
2 files changed, 6 insertions, 11 deletions
diff --git a/zephyr/test/drivers/common/src/utils.c b/zephyr/test/drivers/common/src/utils.c index f559e8629a..62e1065f08 100644 --- a/zephyr/test/drivers/common/src/utils.c +++ b/zephyr/test/drivers/common/src/utils.c @@ -60,11 +60,12 @@ void test_set_chipset_to_s0(void) /* * Make sure that battery is in good condition to * not trigger hibernate in charge_state_v2.c - * Set battery voltage to expected value and capacity to 75%. Battery + * Set battery voltage to expected value and capacity to 50%. Battery * will not be full and accepts charging, but will not trigger - * hibernate. Charge level is chosen arbitrary. + * hibernate. Charge level is set to the default value of an emulator + * (emul/emul_smart_battery.c). b/244366201. */ - test_set_battery_level(75); + test_set_battery_level(50); /* The easiest way to power on seems to be the shell command. */ zassert_equal(EC_SUCCESS, shell_execute_cmd(get_ec_shell(), "power on"), diff --git a/zephyr/test/drivers/default/src/virtual_battery.c b/zephyr/test/drivers/default/src/virtual_battery.c index 5eed8296a6..6de4df6190 100644 --- a/zephyr/test/drivers/default/src/virtual_battery.c +++ b/zephyr/test/drivers/default/src/virtual_battery.c @@ -141,10 +141,7 @@ ZTEST_USER(virtual_battery, test_read_regs) expected = 100 * bat->cap / bat->full_cap; word = virtual_battery_read16(SB_RELATIVE_STATE_OF_CHARGE); - /* TODO(b/243816417): Flaky virtual battery test for mocked power */ - if (!IS_ENABLED(CONFIG_POWER_SEQUENCE_MOCK)) { - zassert_equal(expected, word, "%d != %d", expected, word); - } + zassert_equal(expected, word, "%d != %d", expected, word); word = virtual_battery_read16(SB_TEMPERATURE); zassert_equal(bat->temp, word, "%d != %d", bat->temp, word); @@ -171,10 +168,7 @@ ZTEST_USER(virtual_battery, test_read_regs) zassert_equal(bat->design_cap, word, "%d != %d", bat->design_cap, word); word = virtual_battery_read16(SB_REMAINING_CAPACITY); - /* TODO(b/243816417): Flaky virtual battery test for mocked power */ - if (!IS_ENABLED(CONFIG_POWER_SEQUENCE_MOCK)) { - zassert_equal(bat->cap, word, "%d != %d", bat->cap, word); - } + zassert_equal(bat->cap, word, "%d != %d", bat->cap, word); len = virtual_battery_read_str(SB_MANUFACTURER_NAME, &str, 32); zassert_equal(bat->mf_name_len, len, "%d != %d", bat->mf_name_len, len); |