Skip to content

Commit

Permalink
tests: bluetooth: host: Fix CI failures with bt_keys_get_addr() UT
Browse files Browse the repository at this point in the history
CI tests were failing due to a recent change to zassume_true()
implementation.
While the test case is still skipped when assumption fails, but it is
now causing the final execution result to fail.

zassume_true() was replaced by ztest_test_skip() combined with
a conditional 'if' statement to get the required effect.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
  • Loading branch information
ahmedmoheb-nordic authored and carlescufi committed Oct 14, 2022
1 parent 2037b20 commit 7ef0575
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/bluetooth/host/keys/bt_keys_get_addr/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ static void fff_reset_rule_before(const struct ztest_unit_test *test, void *fixt

/* Skip tests if not all startup suite hasn't been executed */
if (strcmp(test->test_suite_name, "bt_keys_get_addr_startup")) {
zassume_true(all_startup_checks_executed == true, NULL);
if (all_startup_checks_executed != true) {
ztest_test_skip();
}
}

CONN_FFF_FAKES_LIST(RESET_FAKE);
Expand Down

0 comments on commit 7ef0575

Please sign in to comment.