diff mbox

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

Message ID 1435767428-22409-2-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 2b304f55d0b98bb20e6090efbf1f7447cb6782d9
Headers show

Commit Message

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

Patch

diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index 68525bd..464cdc3 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -19,6 +19,9 @@  ODP_CU_COMMON=common/odp_cunit_common.c
 
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
 dist_odp_shared_memory_SOURCES	= odp_shared_memory.c
+odp_synchronizers_LDADD = \
+	$(top_builddir)/test/validation/common/libcunit_common.a \
+	$(LIB)/libodp.la
 dist_odp_synchronizers_SOURCES = odp_synchronizers.c
 dist_odp_timer_SOURCES  = odp_timer.c
 odp_ver_abt_log_dbg_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/ver_abt_log_dbg
diff --git a/test/validation/odp_synchronizers.c b/test/validation/odp_synchronizers.c
index 71342d1..aa3acfa 100644
--- a/test/validation/odp_synchronizers.c
+++ b/test/validation/odp_synchronizers.c
@@ -1176,7 +1176,7 @@  static void test_atomic_fetch_add_sub(void)
 	test_atomic_functional(test_atomic_fetch_add_sub_thread);
 }
 
-CU_TestInfo test_odp_atomic[] = {
+static CU_TestInfo test_odp_atomic[] = {
 	{"atomic_inc_dec", test_atomic_inc_dec},
 	{"atomic_add_sub", test_atomic_add_sub},
 	{"atomic_fetch_inc_dec", test_atomic_fetch_inc_dec},
@@ -1184,7 +1184,7 @@  CU_TestInfo test_odp_atomic[] = {
 	CU_TEST_INFO_NULL,
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo synchronizers_suites[] = {
 	{"barrier", NULL, NULL, NULL, NULL, test_odp_barrier},
 	{"nolocking", init_locks, NULL, NULL, NULL, test_no_locking},
 	{"spinlock", init_locks, NULL, NULL, NULL, test_odp_spinlock},
@@ -1193,3 +1193,14 @@  CU_SuiteInfo odp_testsuites[] = {
 	{"atomic", NULL, NULL, NULL, NULL, test_odp_atomic},
 	CU_SUITE_INFO_NULL
 };
+
+static int synchronizers_main(void)
+{
+	return odp_cunit_run(synchronizers_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return synchronizers_main();
+}