@@ -304,6 +304,7 @@ AC_CONFIG_FILES([Makefile
test/performance/Makefile
test/validation/Makefile
test/validation/common/Makefile
+ test/validation/crypto/Makefile
test/validation/pktio/Makefile
test/miscellaneous/Makefile
])
@@ -4,7 +4,6 @@ odp_ver_abt_log_dbg
odp_buffer
odp_classification
odp_cpumask
-odp_crypto
odp_init
odp_init_abort
odp_init_log
@@ -7,7 +7,6 @@ AM_LDFLAGS += -static
EXECUTABLES = odp_buffer \
odp_classification \
odp_cpumask \
- odp_crypto \
odp_init \
odp_init_abort \
odp_init_log \
@@ -24,7 +23,8 @@ EXECUTABLES = odp_buffer \
odp_ver_abt_log_dbg
if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = $(EXECUTABLES) \
+ crypto/crypto_main
endif
bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
@@ -38,10 +38,6 @@ 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
dist_odp_init_abort_SOURCES = init/odp_init_abort.c
dist_odp_init_log_SOURCES = init/odp_init_log.c
@@ -61,5 +57,7 @@ dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_system.c \
ver_abt_log_dbg/odp_errno.c \
ver_abt_log_dbg/odp_ver_abt_log_dbg.c
-ODP_MODULES = pktio
+ODP_MODULES = crypto \
+ pktio
+
SUBDIRS = common $(ODP_MODULES)
new file mode 100644
@@ -0,0 +1,2 @@
+crypto_main
+libcrypto.a
new file mode 100644
@@ -0,0 +1,9 @@
+include ../Makefile.inc
+
+noinst_LIBRARIES = libcrypto.a
+libcrypto_a_SOURCES = crypto.c \
+ odp_crypto_test_inp.c
+
+bin_PROGRAMS = crypto_main
+dist_crypto_main_SOURCES = crypto_main.c
+crypto_main_LDADD = libcrypto.a $(LIBCUNIT_COMMON) $(LIBODP)
similarity index 94%
rename from test/validation/odp_crypto.c
rename to test/validation/crypto/crypto.c
@@ -7,6 +7,7 @@
#include <odp.h>
#include "odp_cunit_common.h"
#include "odp_crypto_test_inp.h"
+#include "crypto.h"
#define SHM_PKT_POOL_SIZE (512 * 2048 * 2)
#define SHM_PKT_POOL_BUF_SIZE (1024 * 32)
@@ -93,13 +94,7 @@ int tests_global_term(void)
return 0;
}
-static int crypto_main(void)
+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();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int crypto_main(void);
new file mode 100644
@@ -0,0 +1,12 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "crypto.h"
+
+int main(void)
+{
+ return crypto_main();
+}
Module crypto now gets its own directory and create its own lib (currentely only containing its executable) Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 12 +++++------- test/validation/crypto/.gitignore | 2 ++ test/validation/crypto/Makefile.am | 9 +++++++++ test/validation/{odp_crypto.c => crypto/crypto.c} | 9 ++------- test/validation/crypto/crypto.h | 7 +++++++ test/validation/crypto/crypto_main.c | 12 ++++++++++++ 8 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 test/validation/crypto/.gitignore create mode 100644 test/validation/crypto/Makefile.am rename test/validation/{odp_crypto.c => crypto/crypto.c} (94%) create mode 100644 test/validation/crypto/crypto.h create mode 100644 test/validation/crypto/crypto_main.c