diff mbox

[1/4] validation: own main in odp_pool.c

Message ID 1435242154-21503-2-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard June 25, 2015, 2:22 p.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am |  2 ++
 test/validation/odp_pool.c  | 15 +++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index f7b35a9..b0e577c 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -33,6 +33,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_packet_SOURCES = odp_packet.c
+odp_pool_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+		 $(LIB)/libodp.la
 dist_odp_pool_SOURCES = odp_pool.c
 dist_odp_cpumask_SOURCES = odp_cpumask.c
 dist_odp_thread_SOURCES = odp_thread.c
diff --git a/test/validation/odp_pool.c b/test/validation/odp_pool.c
index 1a518a0..4379eb5 100644
--- a/test/validation/odp_pool.c
+++ b/test/validation/odp_pool.c
@@ -127,7 +127,7 @@  static void pool_lookup_info_print(void)
 
 #define _CU_TEST_INFO(test_func) {#test_func, test_func}
 
-CU_TestInfo pool_tests[] = {
+static CU_TestInfo pool_tests[] = {
 	_CU_TEST_INFO(pool_create_destroy_buffer),
 	_CU_TEST_INFO(pool_create_destroy_packet),
 	_CU_TEST_INFO(pool_create_destroy_timeout),
@@ -136,9 +136,20 @@  CU_TestInfo pool_tests[] = {
 	CU_TEST_INFO_NULL,
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo pool_suites[] = {
 	{ .pName = "Pool tests",
 			.pTests = pool_tests,
 	},
 	CU_SUITE_INFO_NULL,
 };
+
+static int pool_main(void)
+{
+	return odp_cunit_run(pool_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return pool_main();
+}