tests: drivers: rtc: rtc_api: test_update_callback
Add skip for when no update callback is defined in driver Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
This commit is contained in:
parent
2de6274119
commit
f36bd0a075
1 changed files with 5 additions and 1 deletions
|
@ -34,7 +34,11 @@ ZTEST(rtc_api, test_update_callback)
|
|||
|
||||
ret = rtc_update_set_callback(rtc, NULL, NULL);
|
||||
|
||||
zassert_ok(ret, "Failed to clear and disable update callback");
|
||||
if (ret == -ENOSYS) {
|
||||
ztest_test_skip();
|
||||
} else {
|
||||
zassert_ok(ret, "Failed to clear and disable update callback");
|
||||
}
|
||||
|
||||
key = k_spin_lock(&lock);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue