@@ -319,6 +319,7 @@ AC_CONFIG_FILES([Makefile
test/validation/synchronizers/Makefile
test/validation/thread/Makefile
test/validation/time/Makefile
+ test/validation/shmem/Makefile
test/validation/system/Makefile
test/miscellaneous/Makefile
])
@@ -1,4 +1,3 @@
*.log
*.trs
-odp_shared_memory
odp_timer
@@ -4,11 +4,11 @@ include $(top_srcdir)/test/Makefile.inc
AM_CFLAGS += -I$(srcdir)/common
AM_LDFLAGS += -static
-EXECUTABLES = odp_shared_memory$(EXEEXT) \
- odp_timer$(EXEEXT)
+EXECUTABLES = odp_timer$(EXEEXT)
if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = $(EXECUTABLES) \
+ shmem/shmem_main
endif
bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
@@ -16,10 +16,6 @@ bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
ODP_CU_COMMON=common/odp_cunit_common.c
odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
-odp_shared_memory_LDADD = \
- $(top_builddir)/test/validation/common/libcunit_common.a \
- $(LIB)/libodp.la
-dist_odp_shared_memory_SOURCES = odp_shared_memory.c
dist_odp_timer_SOURCES = odp_timer.c
ODP_MODULES = buffer \
@@ -37,6 +33,7 @@ ODP_MODULES = buffer \
synchronizers \
thread \
time \
+ shmem \
system
SUBDIRS = common $(ODP_MODULES)
new file mode 100644
@@ -0,0 +1,2 @@
+shmem_main
+libshmem.a
new file mode 100644
@@ -0,0 +1,8 @@
+include ../Makefile.inc
+
+noinst_LIBRARIES = libshmem.a
+libshmem_a_SOURCES = shmem.c
+
+bin_PROGRAMS = shmem_main$(EXEEXT)
+dist_shmem_main_SOURCES = shmem_main.c
+shmem_main_LDADD = libshmem.a $(LIBCUNIT_COMMON) $(LIBODP)
similarity index 94%
rename from test/validation/odp_shared_memory.c
rename to test/validation/shmem/shmem.c
@@ -6,6 +6,7 @@
#include <odp.h>
#include <odp_cunit_common.h>
+#include "shmem.h"
#define ALIGE_SIZE (128)
#define TESTNAME "cunit_test_shared_data"
@@ -85,13 +86,7 @@ static CU_SuiteInfo shmem_suites[] = {
CU_SUITE_INFO_NULL,
};
-static int shmem_main(void)
+int shmem_main(void)
{
return odp_cunit_run(shmem_suites);
}
-
-/* the following main function will be separated when lib is created */
-int main(void)
-{
- return shmem_main();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2014, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int shmem_main(void);
new file mode 100644
@@ -0,0 +1,12 @@
+/* Copyright (c) 2014, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "shmem.h"
+
+int main(void)
+{
+ return shmem_main();
+}
Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 11 ++++------- test/validation/shmem/.gitignore | 2 ++ test/validation/shmem/Makefile.am | 8 ++++++++ test/validation/{odp_shared_memory.c => shmem/shmem.c} | 9 ++------- test/validation/shmem/shmem.h | 7 +++++++ test/validation/shmem/shmem_main.c | 12 ++++++++++++ 8 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 test/validation/shmem/.gitignore create mode 100644 test/validation/shmem/Makefile.am rename test/validation/{odp_shared_memory.c => shmem/shmem.c} (94%) create mode 100644 test/validation/shmem/shmem.h create mode 100644 test/validation/shmem/shmem_main.c