Module thread now gets its own directory and create its own lib (currentely only containing its executable)
Signed-off-by: Christophe Milard <christophe.mil...@linaro.org> --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 10 ++++------ test/validation/thread/.gitignore | 2 ++ test/validation/thread/Makefile.am | 8 ++++++++ test/validation/{odp_thread.c => thread/thread.c} | 9 ++------- test/validation/thread/thread.h | 7 +++++++ test/validation/thread/thread_main.c | 12 ++++++++++++ 8 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 test/validation/thread/.gitignore create mode 100644 test/validation/thread/Makefile.am rename test/validation/{odp_thread.c => thread/thread.c} (85%) create mode 100644 test/validation/thread/thread.h create mode 100644 test/validation/thread/thread_main.c diff --git a/configure.ac b/configure.ac index bfe5964..c036040 100644 --- a/configure.ac +++ b/configure.ac @@ -315,6 +315,7 @@ AC_CONFIG_FILES([Makefile test/validation/random/Makefile test/validation/scheduler/Makefile test/validation/system/Makefile + test/validation/thread/Makefile test/miscellaneous/Makefile ]) diff --git a/test/validation/.gitignore b/test/validation/.gitignore index cf48485..b274a79 100644 --- a/test/validation/.gitignore +++ b/test/validation/.gitignore @@ -5,4 +5,3 @@ odp_cpumask odp_shared_memory odp_synchronizers odp_timer -odp_thread diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 52dc963..53ba9b6 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -8,11 +8,11 @@ EXECUTABLES = odp_cpumask$(EXEEXT) \ odp_shared_memory$(EXEEXT) \ odp_synchronizers$(EXEEXT) \ odp_timer$(EXEEXT) \ - odp_thread$(EXEEXT) \ odp_ver_abt_log_dbg$(EXEEXT) if test_vald -TESTS = $(EXECUTABLES) +TESTS = $(EXECUTABLES) \ + thread/thread_main endif bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) @@ -24,9 +24,6 @@ dist_odp_shared_memory_SOURCES = odp_shared_memory.c dist_odp_synchronizers_SOURCES = odp_synchronizers.c dist_odp_timer_SOURCES = odp_timer.c dist_odp_cpumask_SOURCES = odp_cpumask.c -odp_thread_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \ - $(LIB)/libodp.la -dist_odp_thread_SOURCES = odp_thread.c odp_ver_abt_log_dbg_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/ver_abt_log_dbg dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_system.c \ ver_abt_log_dbg/odp_errno.c \ @@ -42,6 +39,7 @@ ODP_MODULES = buffer \ pool \ random \ scheduler \ - system + system \ + thread SUBDIRS = common $(ODP_MODULES) diff --git a/test/validation/thread/.gitignore b/test/validation/thread/.gitignore new file mode 100644 index 0000000..3b80ec1 --- /dev/null +++ b/test/validation/thread/.gitignore @@ -0,0 +1,2 @@ +libthread.a +thread_main diff --git a/test/validation/thread/Makefile.am b/test/validation/thread/Makefile.am new file mode 100644 index 0000000..218a810 --- /dev/null +++ b/test/validation/thread/Makefile.am @@ -0,0 +1,8 @@ +include ../Makefile.inc + +noinst_LIBRARIES = libthread.a +libthread_a_SOURCES = thread.c + +bin_PROGRAMS = thread_main$(EXEEXT) +dist_thread_main_SOURCES = thread_main.c +thread_main_LDADD = libthread.a $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/odp_thread.c b/test/validation/thread/thread.c similarity index 85% rename from test/validation/odp_thread.c rename to test/validation/thread/thread.c index afbf46d..d0bd75e 100644 --- a/test/validation/odp_thread.c +++ b/test/validation/thread/thread.c @@ -6,6 +6,7 @@ #include <odp.h> #include <odp_cunit_common.h> +#include "thread.h" /* Helper macro for CU_TestInfo initialization */ #define _CU_TEST_INFO(test_func) {#test_func, test_func} @@ -40,13 +41,7 @@ static CU_SuiteInfo thread_suites[] = { CU_SUITE_INFO_NULL, }; -static int thread_main(void) +int thread_main(void) { return odp_cunit_run(thread_suites); } - -/* the following main function will be separated when lib is created */ -int main(void) -{ - return thread_main(); -} diff --git a/test/validation/thread/thread.h b/test/validation/thread/thread.h new file mode 100644 index 0000000..94c288e --- /dev/null +++ b/test/validation/thread/thread.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +int thread_main(void); diff --git a/test/validation/thread/thread_main.c b/test/validation/thread/thread_main.c new file mode 100644 index 0000000..1751b01 --- /dev/null +++ b/test/validation/thread/thread_main.c @@ -0,0 +1,12 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "thread.h" + +int main(void) +{ + return thread_main(); +} -- 1.9.1 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp