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:
Richard Wheatley 2024-08-05 21:43:53 -05:00 committed by Anas Nashif
commit f36bd0a075

View file

@ -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);