diff mbox

[1/5] validation: own main in odp_cpumask

Message ID 1435745141-1078-2-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 5c01023138c5976c1f5971e9f2482d08b9c76dde
Headers show

Commit Message

Christophe Milard July 1, 2015, 10:05 a.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am   |  2 ++
 test/validation/odp_cpumask.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 fe8463f..8e429d9 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -22,6 +22,8 @@  odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
 dist_odp_shared_memory_SOURCES	= odp_shared_memory.c
 dist_odp_synchronizers_SOURCES = odp_synchronizers.c
 dist_odp_timer_SOURCES  = odp_timer.c
+odp_cpumask_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+		    $(LIB)/libodp.la
 dist_odp_cpumask_SOURCES = odp_cpumask.c
 odp_ver_abt_log_dbg_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/ver_abt_log_dbg
 dist_odp_ver_abt_log_dbg_SOURCES  = ver_abt_log_dbg/odp_system.c \
diff --git a/test/validation/odp_cpumask.c b/test/validation/odp_cpumask.c
index 1b1c104..5986329 100644
--- a/test/validation/odp_cpumask.c
+++ b/test/validation/odp_cpumask.c
@@ -455,7 +455,7 @@  static void test_odp_cpumask_next(void)
 		CU_ASSERT(odp_cpumask_next(&mask1, i) == expected[i]);
 }
 
-CU_TestInfo test_odp_cpumask[] = {
+static CU_TestInfo test_odp_cpumask[] = {
 	{"odp_cpumask_to/from_str()", test_odp_cpumask_to_from_str},
 	{"odp_cpumask_equal()"	    , test_odp_cpumask_equal},
 	{"odp_cpumask_zero()"	    , test_odp_cpumask_zero},
@@ -473,7 +473,18 @@  CU_TestInfo test_odp_cpumask[] = {
 	CU_TEST_INFO_NULL,
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo cpumask_suites[] = {
 	{"Cpumask", NULL, NULL, NULL, NULL, test_odp_cpumask},
 	CU_SUITE_INFO_NULL,
 };
+
+static int cpumask_main(void)
+{
+	return odp_cunit_run(cpumask_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return cpumask_main();
+}