@@ -303,6 +303,7 @@ AC_CONFIG_FILES([Makefile
test/api_test/Makefile
test/performance/Makefile
test/validation/Makefile
+ test/validation/buffer/Makefile
test/validation/classification/Makefile
test/validation/common/Makefile
test/validation/crypto/Makefile
@@ -1,7 +1,6 @@
*.log
*.trs
odp_ver_abt_log_dbg
-odp_buffer
odp_cpumask
odp_scheduler
odp_shared_memory
@@ -4,8 +4,7 @@ include $(top_srcdir)/test/Makefile.inc
AM_CFLAGS += -I$(srcdir)/common
AM_LDFLAGS += -static
-EXECUTABLES = odp_buffer \
- odp_cpumask \
+EXECUTABLES = odp_cpumask \
odp_scheduler \
odp_shared_memory \
odp_synchronizers \
@@ -14,17 +13,14 @@ EXECUTABLES = odp_buffer \
odp_ver_abt_log_dbg
if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = $(EXECUTABLES) \
+ buffer/buffer_main
endif
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 \
$(LIB)/libodp.la
@@ -39,7 +35,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 = classification \
+ODP_MODULES = buffer \
+ classification \
crypto \
init \
queue \
new file mode 100644
@@ -0,0 +1,2 @@
+buffer_main
+libbuffer.a
new file mode 100644
@@ -0,0 +1,8 @@
+include ../Makefile.inc
+
+noinst_LIBRARIES = libbuffer.a
+libbuffer_a_SOURCES = buffer.c
+
+bin_PROGRAMS = buffer_main
+dist_buffer_main_SOURCES = buffer_main.c
+buffer_main_LDADD = libbuffer.a $(LIBCUNIT_COMMON) $(LIBODP)
similarity index 96%
rename from test/validation/odp_buffer.c
rename to test/validation/buffer/buffer.c
@@ -6,6 +6,7 @@
#include <odp.h>
#include "odp_cunit_common.h"
+#include "buffer.h"
/* Helper macro for CU_TestInfo initialization */
#define _CU_TEST_INFO(test_func) {#test_func, test_func}
@@ -157,13 +158,7 @@ static CU_SuiteInfo buffer_suites[] = {
CU_SUITE_INFO_NULL,
};
-static int buffer_main(void)
+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();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int buffer_main(void);
new file mode 100644
@@ -0,0 +1,11 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+#include "buffer.h"
+
+int main(void)
+{
+ return buffer_main();
+}
Module buffer 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 | 13 +++++-------- test/validation/buffer/.gitignore | 2 ++ test/validation/buffer/Makefile.am | 8 ++++++++ test/validation/{odp_buffer.c => buffer/buffer.c} | 9 ++------- test/validation/buffer/buffer.h | 7 +++++++ test/validation/buffer/buffer_main.c | 11 +++++++++++ 8 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 test/validation/buffer/.gitignore create mode 100644 test/validation/buffer/Makefile.am rename test/validation/{odp_buffer.c => buffer/buffer.c} (96%) create mode 100644 test/validation/buffer/buffer.h create mode 100644 test/validation/buffer/buffer_main.c