diff mbox

[PATCHv3,1/5] validation: own main in odp_classification.c

Message ID 1435051290-24369-2-git-send-email-christophe.milard@linaro.org
State Accepted
Commit bb29f344f51ee74bccf2c0c8d6745b62d1ebc578
Headers show

Commit Message

Christophe Milard June 23, 2015, 9:21 a.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am          |  3 +++
 test/validation/odp_classification.c | 15 ++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index a0277e7..227e7a2 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -33,6 +33,9 @@  ODP_CU_COMMON=common/odp_cunit_common.c
 odp_buffer_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/buffer
 dist_odp_buffer_SOURCES = odp_buffer.c
 odp_classification_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/classification
+odp_classification_LDADD = \
+	$(top_builddir)/test/validation/common/libcunit_common.a \
+	$(LIB)/libodp.la
 dist_odp_classification_SOURCES = classification/odp_classification_tests.c \
 				classification/odp_classification_basic.c \
 				odp_classification.c
diff --git a/test/validation/odp_classification.c b/test/validation/odp_classification.c
index b501015..31c885d 100644
--- a/test/validation/odp_classification.c
+++ b/test/validation/odp_classification.c
@@ -4,9 +4,11 @@ 
  * SPDX-License-Identifier:	BSD-3-Clause
  */
 
+#include <odp.h>
+#include <odp_cunit_common.h>
 #include "odp_classification_testsuites.h"
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo classification_suites[] = {
 	{ .pName = "classification basic",
 			.pTests = classification_basic,
 	},
@@ -17,3 +19,14 @@  CU_SuiteInfo odp_testsuites[] = {
 	},
 	CU_SUITE_INFO_NULL,
 };
+
+static int classification_main(void)
+{
+	return odp_cunit_run(classification_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return classification_main();
+}