test: Update the new ZTEST APIs tests/net/mgmt

TEST=twister -T tests/net/mgmt # Only build

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
This commit is contained in:
Hu Zhenyu 2022-07-04 13:50:51 +08:00 committed by Carles Cufí
parent 78af3f39ec
commit 3c7387050c
2 changed files with 3 additions and 6 deletions

View file

@ -18,3 +18,4 @@ CONFIG_NET_IPV6=y
CONFIG_NET_L2_DUMMY=y
CONFIG_NET_L2_ETHERNET=n
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y

View file

@ -309,7 +309,7 @@ static bool _iface_ip6_del(void)
return false;
}
void test_mgmt(void)
ZTEST(mgmt_fn_test_suite, test_mgmt)
{
TC_PRINT("Starting Network Management API test\n");
@ -354,8 +354,4 @@ void test_mgmt(void)
"test_synchronous_event_listener failed");
}
void test_main(void)
{
ztest_test_suite(test_mgmt_fn, ztest_unit_test(test_mgmt));
ztest_run_test_suite(test_mgmt_fn);
}
ZTEST_SUITE(mgmt_fn_test_suite, NULL, NULL, NULL, NULL, NULL);