Issues/issue 593 update to zephyr v3 6 0 (#601)
* [WIP] update manifest to zephyr v3.6.0
* [WIP] Deprecated ZTEST_NEW_API adjustments
Zephyr v3.6.0 removed Kconfig ZTEST_NEW_API.
The old ZTEST API is still used by non-Zephyr builds,
so the config setting is moved from `prj.conf` to
the test's CMakeLists.txt as `add_compile_definitions()`.
Verified by:
1. make clean all test
2. ./zephyr/scripts/twister -p unit_testing \
-T bacnet-stack/zephyr/tests/
---------
Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
This commit is contained in:
@@ -19,7 +19,11 @@
|
||||
/**
|
||||
* @brief Test Calendar handling
|
||||
*/
|
||||
#ifdef CONFIG_ZTEST_NEW_API
|
||||
ZTEST(bacnet_calendar, testCalendar)
|
||||
#else
|
||||
static void testCalendar(void)
|
||||
#endif
|
||||
{
|
||||
uint8_t apdu[MAX_APDU] = { 0 };
|
||||
int len = 0, test_len = 0;
|
||||
@@ -123,7 +127,11 @@ static void testCalendar(void)
|
||||
zassert_true(status, NULL);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ZTEST_NEW_API
|
||||
ZTEST(bacnet_calendar, testPresentValue)
|
||||
#else
|
||||
static void testPresentValue(void)
|
||||
#endif
|
||||
{
|
||||
const uint32_t instance = 1;
|
||||
BACNET_DATE date;
|
||||
@@ -228,6 +236,9 @@ static void testPresentValue(void)
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ZTEST_NEW_API
|
||||
ZTEST_SUITE(bacnet_calendar, NULL, NULL, NULL, NULL, NULL);
|
||||
#else
|
||||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(calendar_tests,
|
||||
@@ -237,3 +248,4 @@ void test_main(void)
|
||||
|
||||
ztest_run_test_suite(calendar_tests);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,11 @@
|
||||
/**
|
||||
* @brief Test Time Value handling
|
||||
*/
|
||||
#ifdef CONFIG_ZTEST_NEW_API
|
||||
ZTEST(bacnet_tv, testTimeValue)
|
||||
#else
|
||||
static void testTimeValue(void)
|
||||
#endif
|
||||
{
|
||||
uint8_t apdu[MAX_APDU] = { 0 };
|
||||
int len = 0, test_len = 0;
|
||||
@@ -131,6 +135,9 @@ static void testTimeValue(void)
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ZTEST_NEW_API
|
||||
ZTEST_SUITE(bacnet_tv, NULL, NULL, NULL, NULL, NULL);
|
||||
#else
|
||||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(tv_tests,
|
||||
@@ -139,3 +146,4 @@ void test_main(void)
|
||||
|
||||
ztest_run_test_suite(tv_tests);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user