@@ -24,6 +24,8 @@ dist_odp_shared_memory_SOURCES = odp_shared_memory.c
dist_odp_synchronizers_SOURCES = odp_synchronizers.c
dist_odp_timer_SOURCES = odp_timer.c
dist_odp_cpumask_SOURCES = odp_cpumask.c
+odp_thread_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+ $(LIB)/libodp.la
dist_odp_thread_SOURCES = odp_thread.c
odp_ver_abt_log_dbg_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/ver_abt_log_dbg
dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_system.c \
@@ -28,14 +28,25 @@ static void test_odp_thread_count(void)
CU_PASS();
}
-CU_TestInfo test_odp_thread[] = {
+static CU_TestInfo test_odp_thread[] = {
_CU_TEST_INFO(test_odp_cpu_id),
_CU_TEST_INFO(test_odp_thread_id),
_CU_TEST_INFO(test_odp_thread_count),
CU_TEST_INFO_NULL,
};
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo thread_suites[] = {
{"thread", NULL, NULL, NULL, NULL, test_odp_thread},
CU_SUITE_INFO_NULL,
};
+
+static int thread_main(void)
+{
+ return odp_cunit_run(thread_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+ return thread_main();
+}
Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- test/validation/Makefile.am | 2 ++ test/validation/odp_thread.c | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-)