diff mbox

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

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

Commit Message

Christophe Milard June 23, 2015, 12:42 p.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am  |  2 ++
 test/validation/odp_random.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 03e1509..d3fd184 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -35,6 +35,8 @@  dist_odp_init_SOURCES	= init/odp_init.c
 dist_odp_init_abort_SOURCES = init/odp_init_abort.c
 dist_odp_init_log_SOURCES = init/odp_init_log.c
 dist_odp_queue_SOURCES	= odp_queue.c
+odp_random_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+		   $(LIB)/libodp.la
 dist_odp_random_SOURCES = odp_random.c
 dist_odp_scheduler_SOURCES = odp_scheduler.c
 dist_odp_shared_memory_SOURCES	= odp_shared_memory.c
diff --git a/test/validation/odp_random.c b/test/validation/odp_random.c
index ebc9705..4c58d32 100644
--- a/test/validation/odp_random.c
+++ b/test/validation/odp_random.c
@@ -19,12 +19,23 @@  static void random_get_size(void)
 	CU_ASSERT(ret == sizeof(buf));
 }
 
-CU_TestInfo test_odp_random[] = {
+static CU_TestInfo test_odp_random[] = {
 	_CU_TEST_INFO(random_get_size),
 	CU_TEST_INFO_NULL,
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo random_suites[] = {
 	{"Random", NULL, NULL, NULL, NULL, test_odp_random},
 	CU_SUITE_INFO_NULL,
 };
+
+static int random_main(void)
+{
+	return odp_cunit_run(random_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return random_main();
+}