diff mbox

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

Message ID 1434577905-11797-2-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 0bf18b0bcfa94f975f49aa69969c42a9858d4198
Headers show

Commit Message

Christophe Milard June 17, 2015, 9:51 p.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/Makefile.am  |  2 ++
 test/validation/odp_crypto.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 6968301..e40bc7d 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -38,6 +38,8 @@  dist_odp_classification_SOURCES = classification/odp_classification_tests.c \
 				classification/odp_classification_basic.c \
 				odp_classification.c
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
+odp_crypto_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+		   $(LIB)/libodp.la
 dist_odp_crypto_SOURCES = crypto/odp_crypto_test_inp.c \
 			  odp_crypto.c
 dist_odp_init_SOURCES	= init/odp_init.c
diff --git a/test/validation/odp_crypto.c b/test/validation/odp_crypto.c
index 2a20ea1..ef0abbc 100644
--- a/test/validation/odp_crypto.c
+++ b/test/validation/odp_crypto.c
@@ -14,7 +14,7 @@ 
 #define SHM_COMPL_POOL_SIZE	(128*1024)
 #define SHM_COMPL_POOL_BUF_SIZE	128
 
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo crypto_suites[] = {
 	{ODP_CRYPTO_SYNC_INP, suite_sync_inp_init, NULL, NULL, NULL,
 			test_array_inp},
 	{ODP_CRYPTO_ASYNC_INP, suite_async_inp_init, NULL, NULL, NULL,
@@ -92,3 +92,14 @@  int tests_global_term(void)
 
 	return 0;
 }
+
+static int crypto_main(void)
+{
+	return odp_cunit_run(crypto_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+	return crypto_main();
+}