diff mbox

[1/5] validation: own main in odp_queue.c

Message ID 1435229434-25384-2-git-send-email-christophe.milard@linaro.org
State New
Headers show

Commit Message

Christophe Milard June 25, 2015, 10:50 a.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am |  2 ++
 test/validation/odp_queue.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 a4eafea..1c6c10d 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -27,6 +27,8 @@  ODP_CU_COMMON=common/odp_cunit_common.c
 odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
 dist_odp_buffer_SOURCES = odp_buffer.c
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
+odp_queue_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+		  $(LIB)/libodp.la
 dist_odp_queue_SOURCES	= odp_queue.c
 odp_random_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
 		   $(LIB)/libodp.la
diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c
index 01a704c..e944677 100644
--- a/test/validation/odp_queue.c
+++ b/test/validation/odp_queue.c
@@ -107,13 +107,24 @@  static void test_odp_queue_sunnyday(void)
 	return;
 }
 
-CU_TestInfo test_odp_queue[] = {
+static CU_TestInfo test_odp_queue[] = {
 	{"queue sunnyday",  test_odp_queue_sunnyday},
 	CU_TEST_INFO_NULL,
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo queue_suites[] = {
 	{"Queue", init_queue_suite, init_queue_finalize,
 			NULL, NULL, test_odp_queue},
 	CU_SUITE_INFO_NULL,
 };
+
+static int queue_main(void)
+{
+	return odp_cunit_run(queue_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return queue_main();
+}