aboutsummaryrefslogtreecommitdiff
path: root/test/validation/init/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/validation/init/init.c')
-rw-r--r--test/validation/init/init.c66
1 files changed, 44 insertions, 22 deletions
diff --git a/test/validation/init/init.c b/test/validation/init/init.c
index 3a04fc9c8..a8a564063 100644
--- a/test/validation/init/init.c
+++ b/test/validation/init/init.c
@@ -8,7 +8,6 @@
#include <stdlib.h>
#include <odp.h>
#include <CUnit/Basic.h>
-#include "odp_cunit_common.h"
#include "init.h"
/* flag set when the replacement logging function is used */
@@ -37,14 +36,14 @@ void init_test_odp_init_global_replace_abort(void)
CU_ASSERT(status == 0);
}
-CU_TestInfo init_suite_abort[] = {
- _CU_TEST_INFO(init_test_odp_init_global_replace_abort),
- CU_TEST_INFO_NULL,
+odp_testinfo_t init_suite_abort[] = {
+ ODP_TEST_INFO(init_test_odp_init_global_replace_abort),
+ ODP_TEST_INFO_NULL,
};
-CU_SuiteInfo init_suites_abort[] = {
- {"Init", NULL, NULL, NULL, NULL, init_suite_abort},
- CU_SUITE_INFO_NULL,
+odp_suiteinfo_t init_suites_abort[] = {
+ {"Init", NULL, NULL, init_suite_abort},
+ ODP_SUITE_INFO_NULL,
};
static void odp_init_abort(void)
@@ -54,12 +53,19 @@ static void odp_init_abort(void)
int init_main_abort(void)
{
+ int ret;
+
/* prevent default ODP init: */
odp_cunit_register_global_init(NULL);
odp_cunit_register_global_term(NULL);
/* run the tests: */
- return odp_cunit_run(init_suites_abort);
+ ret = odp_cunit_register(init_suites_abort);
+
+ if (ret == 0)
+ ret = odp_cunit_run();
+
+ return ret;
}
/* test ODP global init, with alternate log function */
@@ -82,14 +88,14 @@ void init_test_odp_init_global_replace_log(void)
CU_ASSERT(status == 0);
}
-CU_TestInfo init_suite_log[] = {
- _CU_TEST_INFO(init_test_odp_init_global_replace_log),
- CU_TEST_INFO_NULL,
+odp_testinfo_t init_suite_log[] = {
+ ODP_TEST_INFO(init_test_odp_init_global_replace_log),
+ ODP_TEST_INFO_NULL,
};
-CU_SuiteInfo init_suites_log[] = {
- {"Init", NULL, NULL, NULL, NULL, init_suite_log},
- CU_SUITE_INFO_NULL,
+odp_suiteinfo_t init_suites_log[] = {
+ {"Init", NULL, NULL, init_suite_log},
+ ODP_SUITE_INFO_NULL,
};
static int odp_init_log(odp_log_level_e level __attribute__((unused)),
@@ -110,12 +116,20 @@ static int odp_init_log(odp_log_level_e level __attribute__((unused)),
int init_main_log(void)
{
+ int ret;
+
/* prevent default ODP init: */
odp_cunit_register_global_init(NULL);
odp_cunit_register_global_term(NULL);
+ /* register the tests: */
+ ret = odp_cunit_register(init_suites_log);
+
/* run the tests: */
- return odp_cunit_run(init_suites_log);
+ if (ret == 0)
+ ret = odp_cunit_run();
+
+ return ret;
}
/* test normal ODP global init */
@@ -130,22 +144,30 @@ void init_test_odp_init_global(void)
CU_ASSERT(status == 0);
}
-CU_TestInfo init_suite_ok[] = {
- _CU_TEST_INFO(init_test_odp_init_global),
- CU_TEST_INFO_NULL,
+odp_testinfo_t init_suite_ok[] = {
+ ODP_TEST_INFO(init_test_odp_init_global),
+ ODP_TEST_INFO_NULL,
};
-CU_SuiteInfo init_suites_ok[] = {
- {"Init", NULL, NULL, NULL, NULL, init_suite_ok},
- CU_SUITE_INFO_NULL,
+odp_suiteinfo_t init_suites_ok[] = {
+ {"Init", NULL, NULL, init_suite_ok},
+ ODP_SUITE_INFO_NULL,
};
int init_main_ok(void)
{
+ int ret;
+
/* prevent default ODP init: */
odp_cunit_register_global_init(NULL);
odp_cunit_register_global_term(NULL);
+ /* register the tests: */
+ ret = odp_cunit_register(init_suites_ok);
+
/* run the tests: */
- return odp_cunit_run(init_suites_ok);
+ if (ret == 0)
+ ret = odp_cunit_run();
+
+ return ret;
}