diff mbox

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

Message ID 1435933656-6848-2-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 441a9ab1babd0267c860846a501dbaea5f4cdd67
Headers show

Commit Message

Christophe Milard July 3, 2015, 2:27 p.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am         |  3 +++
 test/validation/odp_shared_memory.c | 14 ++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index 8401a07..6a02f0a 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -16,6 +16,9 @@  bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 ODP_CU_COMMON=common/odp_cunit_common.c
 
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
+odp_shared_memory_LDADD = \
+	$(top_builddir)/test/validation/common/libcunit_common.a \
+	$(LIB)/libodp.la
 dist_odp_shared_memory_SOURCES	= odp_shared_memory.c
 dist_odp_timer_SOURCES  = odp_timer.c
 
diff --git a/test/validation/odp_shared_memory.c b/test/validation/odp_shared_memory.c
index 938ae65..b7f431a 100644
--- a/test/validation/odp_shared_memory.c
+++ b/test/validation/odp_shared_memory.c
@@ -75,13 +75,23 @@  static void test_odp_shm_sunnyday(void)
 	odp_cunit_thread_exit(&thrdarg);
 }
 
-CU_TestInfo test_odp_shm[] = {
+static CU_TestInfo test_odp_shm[] = {
 	{"test_odp_shm_creat",  test_odp_shm_sunnyday},
 	CU_TEST_INFO_NULL,
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo shmem_suites[] = {
 	{"Shared Memory", NULL, NULL, NULL, NULL, test_odp_shm},
 	CU_SUITE_INFO_NULL,
 };
 
+static int shmem_main(void)
+{
+	return odp_cunit_run(shmem_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return shmem_main();
+}