diff mbox

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

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

Commit Message

Christophe Milard June 26, 2015, 11:09 a.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am  |  2 ++
 test/validation/odp_packet.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 8c2ed7b..2ce00a0 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -31,6 +31,8 @@  dist_odp_scheduler_SOURCES = odp_scheduler.c
 dist_odp_shared_memory_SOURCES	= odp_shared_memory.c
 dist_odp_synchronizers_SOURCES = odp_synchronizers.c
 dist_odp_timer_SOURCES  = odp_timer.c
+odp_packet_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+		   $(LIB)/libodp.la
 dist_odp_packet_SOURCES = odp_packet.c
 dist_odp_cpumask_SOURCES = odp_cpumask.c
 dist_odp_thread_SOURCES = odp_thread.c
diff --git a/test/validation/odp_packet.c b/test/validation/odp_packet.c
index 5915aba..a621747 100644
--- a/test/validation/odp_packet.c
+++ b/test/validation/odp_packet.c
@@ -700,7 +700,7 @@  static void packet_offset(void)
 	CU_ASSERT(ptr != NULL);
 }
 
-CU_TestInfo packet_tests[] = {
+static CU_TestInfo packet_tests[] = {
 	_CU_TEST_INFO(packet_alloc_free),
 	_CU_TEST_INFO(packet_alloc_segmented),
 	_CU_TEST_INFO(packet_basic_metadata),
@@ -722,7 +722,7 @@  CU_TestInfo packet_tests[] = {
 	CU_TEST_INFO_NULL,
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo packet_suites[] = {
 	{ .pName = "packet tests",
 			.pTests = packet_tests,
 			.pInitFunc = packet_testsuite_init,
@@ -730,3 +730,14 @@  CU_SuiteInfo odp_testsuites[] = {
 	},
 	CU_SUITE_INFO_NULL,
 };
+
+static int packet_main(void)
+{
+	return odp_cunit_run(packet_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return packet_main();
+}