diff mbox

[2/5] validation: own main in odp_buffer.c

Message ID 1435330910-15536-3-git-send-email-christophe.milard@linaro.org
State Accepted
Commit df9352eecbad622c5ad0388fb01233890360c9e0
Headers show

Commit Message

Christophe Milard June 26, 2015, 3:01 p.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am  |  2 ++
 test/validation/odp_buffer.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 aa41d63..c9aac49 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -22,6 +22,8 @@  bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 ODP_CU_COMMON=common/odp_cunit_common.c
 
 odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
+odp_buffer_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+		   $(LIB)/libodp.la
 dist_odp_buffer_SOURCES = odp_buffer.c
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
 odp_random_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
diff --git a/test/validation/odp_buffer.c b/test/validation/odp_buffer.c
index f2c0c9b..60a9f71 100644
--- a/test/validation/odp_buffer.c
+++ b/test/validation/odp_buffer.c
@@ -148,7 +148,7 @@  static CU_TestInfo buffer_tests[] = {
 	CU_TEST_INFO_NULL,
 };
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo buffer_suites[] = {
 	{ .pName = "buffer tests",
 			.pTests = buffer_tests,
 			.pInitFunc = buffer_testsuite_init,
@@ -156,3 +156,14 @@  CU_SuiteInfo odp_testsuites[] = {
 	},
 	CU_SUITE_INFO_NULL,
 };
+
+static int buffer_main(void)
+{
+	return odp_cunit_run(buffer_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return buffer_main();
+}