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:
Greg Shue
2024-03-15 08:29:05 -07:00
committed by GitHub
parent f0760e2b96
commit 78f7340266
160 changed files with 293 additions and 76 deletions
+12
View File
@@ -149,7 +149,11 @@ static int decode_enumerated_custom_fake(
* Tests:
*/
#ifdef CONFIG_ZTEST_NEW_API
ZTEST(bacnet_bacint, test_bacerror_encode_apdu)
#else
static void test_bacerror_encode_apdu(void)
#endif
{
uint8_t test_apdu[32] = { 0 };
@@ -358,7 +362,11 @@ static void test_bacerror_encode_apdu(void)
}
}
#ifdef CONFIG_ZTEST_NEW_API
ZTEST(bacnet_bacerror, test_bacerror_decode_error_class_and_code)
#else
static void test_bacerror_decode_error_class_and_code(void)
#endif
{
#if !BACNET_SVC_SERVER
uint8_t test_apdu[32] = { 0 };
@@ -1118,6 +1126,9 @@ static void test_bacerror_decode_error_class_and_code(void)
#endif
}
#ifdef CONFIG_ZTEST_NEW_API
ZTEST_SUITE(bacnet_error, NULL, NULL, NULL, NULL, NULL);
#else
void test_main(void)
{
ztest_test_suite(bacnet_bacerror,
@@ -1125,3 +1136,4 @@ void test_main(void)
ztest_unit_test(test_bacerror_decode_error_class_and_code));
ztest_run_test_suite(bacnet_bacerror);
}
#endif