diff mbox

[PATCHv2,1/5] validation: own main in odp_time.c

Message ID 1435054119-1216-2-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 011edfbe8a7b8837e3aafc5774c91d1f1dfae2ad
Headers show

Commit Message

Christophe Milard June 23, 2015, 10:08 a.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am |  2 ++
 test/validation/odp_time.c  | 13 ++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index 0df42be..237067f 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -40,6 +40,8 @@  dist_odp_random_SOURCES = odp_random.c
 dist_odp_scheduler_SOURCES = odp_scheduler.c
 dist_odp_shared_memory_SOURCES	= odp_shared_memory.c
 dist_odp_synchronizers_SOURCES = odp_synchronizers.c
+odp_time_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+		 $(LIB)/libodp.la
 dist_odp_time_SOURCES   = odp_time.c
 dist_odp_timer_SOURCES  = odp_timer.c
 dist_odp_packet_SOURCES = odp_packet.c
diff --git a/test/validation/odp_time.c b/test/validation/odp_time.c
index 8db9894..38d940e 100644
--- a/test/validation/odp_time.c
+++ b/test/validation/odp_time.c
@@ -65,7 +65,18 @@  CU_TestInfo test_odp_time[] = {
 	 CU_TEST_INFO_NULL
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo system_suites[] = {
 		{"Time", NULL, NULL, NULL, NULL, test_odp_time},
 		 CU_SUITE_INFO_NULL
 };
+
+static int system_main(void)
+{
+	return odp_cunit_run(system_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return system_main();
+}