@@ -303,6 +303,7 @@ AC_CONFIG_FILES([Makefile
test/api_test/Makefile
test/performance/Makefile
test/validation/Makefile
+ test/validation/classification/Makefile
test/validation/common/Makefile
test/validation/crypto/Makefile
test/validation/pktio/Makefile
@@ -2,7 +2,6 @@
*.trs
odp_ver_abt_log_dbg
odp_buffer
-odp_classification
odp_cpumask
odp_init
odp_init_abort
@@ -5,7 +5,6 @@ AM_CFLAGS += -I$(srcdir)/common
AM_LDFLAGS += -static
EXECUTABLES = odp_buffer \
- odp_classification \
odp_cpumask \
odp_init \
odp_init_abort \
@@ -23,7 +22,8 @@ EXECUTABLES = odp_buffer \
odp_ver_abt_log_dbg
if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = $(EXECUTABLES) \
+ classification/classification_main
endif
bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
@@ -32,13 +32,6 @@ 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
odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
dist_odp_init_SOURCES = init/odp_init.c
dist_odp_init_abort_SOURCES = init/odp_init_abort.c
@@ -59,7 +52,8 @@ 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 = crypto \
+ODP_MODULES = classification \
+ crypto \
pktio
SUBDIRS = common $(ODP_MODULES)
new file mode 100644
@@ -0,0 +1,2 @@
+classification_main
+libclassification.a
new file mode 100644
@@ -0,0 +1,10 @@
+include ../Makefile.inc
+
+noinst_LIBRARIES = libclassification.a
+libclassification_a_SOURCES = odp_classification_basic.c \
+ odp_classification_tests.c \
+ classification.c
+
+bin_PROGRAMS = classification_main
+dist_classification_main_SOURCES = classification_main.c
+classification_main_LDADD = libclassification.a $(LIBCUNIT_COMMON) $(LIBODP)
similarity index 78%
rename from test/validation/odp_classification.c
rename to test/validation/classification/classification.c
@@ -7,6 +7,7 @@
#include <odp.h>
#include <odp_cunit_common.h>
#include "odp_classification_testsuites.h"
+#include "classification.h"
static CU_SuiteInfo classification_suites[] = {
{ .pName = "classification basic",
@@ -20,13 +21,7 @@ static CU_SuiteInfo classification_suites[] = {
CU_SUITE_INFO_NULL,
};
-static int classification_main(void)
+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();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int classification_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 "classification.h"
+
+int main(void)
+{
+ return classification_main();
+}
Module classification 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 | 14 ++++---------- test/validation/classification/.gitignore | 2 ++ test/validation/classification/Makefile.am | 10 ++++++++++ .../classification.c} | 9 ++------- test/validation/classification/classification.h | 7 +++++++ test/validation/classification/classification_main.c | 12 ++++++++++++ 8 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 test/validation/classification/.gitignore create mode 100644 test/validation/classification/Makefile.am rename test/validation/{odp_classification.c => classification/classification.c} (78%) create mode 100644 test/validation/classification/classification.h create mode 100644 test/validation/classification/classification_main.c