diff mbox

[PATCHv3,14/20] validation: thread: lib populated

Message ID 1438018732-2778-15-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 0303d31c4698641390d1179ad9f891b551e85166
Headers show

Commit Message

Christophe Milard July 27, 2015, 5:38 p.m. UTC
test symbols are now exported in the module lib.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/thread/thread.c | 14 +++++++-------
 test/validation/thread/thread.h | 21 +++++++++++++++++++++
 2 files changed, 28 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/test/validation/thread/thread.c b/test/validation/thread/thread.c
index 6fbdaef..f95172a 100644
--- a/test/validation/thread/thread.c
+++ b/test/validation/thread/thread.c
@@ -17,19 +17,19 @@ 
 odp_barrier_t bar_entry;
 odp_barrier_t bar_exit;
 
-static void thread_test_odp_cpu_id(void)
+void thread_test_odp_cpu_id(void)
 {
 	(void)odp_cpu_id();
 	CU_PASS();
 }
 
-static void thread_test_odp_thread_id(void)
+void thread_test_odp_thread_id(void)
 {
 	(void)odp_thread_id();
 	CU_PASS();
 }
 
-static void thread_test_odp_thread_count(void)
+void thread_test_odp_thread_count(void)
 {
 	(void)odp_thread_count();
 	CU_PASS();
@@ -48,7 +48,7 @@  static void *thread_func(void *arg TEST_UNUSED)
 	return NULL;
 }
 
-static void thread_test_odp_thrmask_worker(void)
+void thread_test_odp_thrmask_worker(void)
 {
 	odp_thrmask_t mask;
 	int ret;
@@ -85,7 +85,7 @@  static void thread_test_odp_thrmask_worker(void)
 	odp_cunit_thread_exit(&args);
 }
 
-static void thread_test_odp_thrmask_control(void)
+void thread_test_odp_thrmask_control(void)
 {
 	odp_thrmask_t mask;
 	int ret;
@@ -98,7 +98,7 @@  static void thread_test_odp_thrmask_control(void)
 	CU_ASSERT(ret == 1);
 }
 
-static CU_TestInfo thread_suite[] = {
+CU_TestInfo thread_suite[] = {
 	_CU_TEST_INFO(thread_test_odp_cpu_id),
 	_CU_TEST_INFO(thread_test_odp_thread_id),
 	_CU_TEST_INFO(thread_test_odp_thread_count),
@@ -121,7 +121,7 @@  static CU_TestInfo thread_suite[] = {
 	CU_TEST_INFO_NULL,
 };
 
-static CU_SuiteInfo thread_suites[] = {
+CU_SuiteInfo thread_suites[] = {
 	{"thread", NULL, NULL, NULL, NULL, thread_suite},
 	CU_SUITE_INFO_NULL,
 };
diff --git a/test/validation/thread/thread.h b/test/validation/thread/thread.h
index c0cbb34..ef645b4 100644
--- a/test/validation/thread/thread.h
+++ b/test/validation/thread/thread.h
@@ -7,6 +7,27 @@ 
 #ifndef _ODP_TEST_THREAD_H_
 #define _ODP_TEST_THREAD_H_
 
+#include <odp.h>
+#include <CUnit/Basic.h>
+
+/* test functions: */
+#ifndef TEST_THRMASK
+#define TEST_THRMASK
+#endif
+#include "mask_common.h"
+void thread_test_odp_cpu_id(void);
+void thread_test_odp_thread_id(void);
+void thread_test_odp_thread_count(void);
+void thread_test_odp_thrmask_control(void);
+void thread_test_odp_thrmask_worker(void);
+
+/* test arrays: */
+extern CU_TestInfo thread_suite[];
+
+/* test registry: */
+extern CU_SuiteInfo thread_suites[];
+
+/* main test program: */
 int thread_main(void);
 
 #endif