diff mbox

[PATCHv4,2/8] validation: own main in odp_pktio.c

Message ID 1433850261-1302-3-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard June 9, 2015, 11:44 a.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am |  2 ++
 test/validation/odp_pktio.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 e1474aa..d4bbdb5 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -58,6 +58,8 @@  dist_odp_shared_memory_SOURCES	= odp_shared_memory.c
 dist_odp_synchronizers_SOURCES = odp_synchronizers.c
 dist_odp_time_SOURCES   = odp_time.c
 dist_odp_timer_SOURCES  = odp_timer.c
+odp_pktio_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+	$(LIB)/libodp.la
 dist_odp_pktio_SOURCES	= odp_pktio.c
 dist_odp_packet_SOURCES = odp_packet.c
 dist_odp_pool_SOURCES = odp_pool.c
diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c
index 7c1a666..592136f 100644
--- a/test/validation/odp_pktio.c
+++ b/test/validation/odp_pktio.c
@@ -688,7 +688,7 @@  static int term_pktio_suite(void)
 	return ret;
 }
 
-CU_TestInfo pktio_tests[] = {
+static CU_TestInfo pktio_tests[] = {
 	{"pktio open",		test_odp_pktio_open},
 	{"pktio lookup",	test_odp_pktio_lookup},
 	{"pktio inq",		test_odp_pktio_inq},
@@ -704,8 +704,19 @@  CU_TestInfo pktio_tests[] = {
 	CU_TEST_INFO_NULL
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo pktio_suites[] = {
 	{"Packet I/O",
 		init_pktio_suite, term_pktio_suite, NULL, NULL, pktio_tests},
 	CU_SUITE_INFO_NULL
 };
+
+static int pktio_main(void)
+{
+	return odp_cunit_run(pktio_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return pktio_main();
+}