Module random now gets its own directory and create its own lib (currentely only containing its executable)
Signed-off-by: Christophe Milard <christophe.mil...@linaro.org> Reviewed-by: Stuart Haslam <stuart.has...@linaro.org> --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 8 +++----- test/validation/random/.gitignore | 2 ++ test/validation/random/Makefile.am | 8 ++++++++ test/validation/{odp_random.c => random/random.c} | 9 ++------- test/validation/random/random.h | 7 +++++++ test/validation/random/random_main.c | 12 ++++++++++++ 8 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 test/validation/random/.gitignore create mode 100644 test/validation/random/Makefile.am rename test/validation/{odp_random.c => random/random.c} (82%) create mode 100644 test/validation/random/random.h create mode 100644 test/validation/random/random_main.c diff --git a/configure.ac b/configure.ac index d845cb0..68b65d5 100644 --- a/configure.ac +++ b/configure.ac @@ -307,6 +307,7 @@ AC_CONFIG_FILES([Makefile test/validation/common/Makefile test/validation/crypto/Makefile test/validation/pktio/Makefile + test/validation/random/Makefile test/validation/system/Makefile test/miscellaneous/Makefile ]) diff --git a/test/validation/.gitignore b/test/validation/.gitignore index 47bf0a9..8f78055 100644 --- a/test/validation/.gitignore +++ b/test/validation/.gitignore @@ -9,7 +9,6 @@ odp_init_log odp_packet odp_pool odp_queue -odp_random odp_scheduler odp_shared_memory odp_synchronizers diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index d3fd184..6beb6b5 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -12,7 +12,6 @@ EXECUTABLES = odp_buffer \ odp_packet \ odp_pool \ odp_queue \ - odp_random \ odp_scheduler \ odp_shared_memory \ odp_synchronizers \ @@ -21,7 +20,8 @@ EXECUTABLES = odp_buffer \ odp_ver_abt_log_dbg if test_vald -TESTS = $(EXECUTABLES) +TESTS = $(EXECUTABLES) \ + random/random_main endif bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) @@ -35,9 +35,6 @@ 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 dist_odp_queue_SOURCES = odp_queue.c -odp_random_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \ - $(LIB)/libodp.la -dist_odp_random_SOURCES = odp_random.c dist_odp_scheduler_SOURCES = odp_scheduler.c dist_odp_shared_memory_SOURCES = odp_shared_memory.c dist_odp_synchronizers_SOURCES = odp_synchronizers.c @@ -54,6 +51,7 @@ dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_system.c \ ODP_MODULES = classification \ crypto \ pktio \ + random \ system SUBDIRS = common $(ODP_MODULES) diff --git a/test/validation/random/.gitignore b/test/validation/random/.gitignore new file mode 100644 index 0000000..5ae7ebf --- /dev/null +++ b/test/validation/random/.gitignore @@ -0,0 +1,2 @@ +random_main +librandom.a diff --git a/test/validation/random/Makefile.am b/test/validation/random/Makefile.am new file mode 100644 index 0000000..648bc2f --- /dev/null +++ b/test/validation/random/Makefile.am @@ -0,0 +1,8 @@ +include ../Makefile.inc + +noinst_LIBRARIES = librandom.a +librandom_a_SOURCES = random.c + +bin_PROGRAMS = random_main +dist_random_main_SOURCES = random_main.c +random_main_LDADD = librandom.a $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/odp_random.c b/test/validation/random/random.c similarity index 82% rename from test/validation/odp_random.c rename to test/validation/random/random.c index 428af78..a42523f 100644 --- a/test/validation/odp_random.c +++ b/test/validation/random/random.c @@ -6,6 +6,7 @@ #include <odp.h> #include <odp_cunit_common.h> +#include "random.h" /* Helper macro for CU_TestInfo initialization */ #define _CU_TEST_INFO(test_func) {#test_func, test_func} @@ -29,13 +30,7 @@ static CU_SuiteInfo random_suites[] = { CU_SUITE_INFO_NULL, }; -static int random_main(void) +int random_main(void) { return odp_cunit_run(random_suites); } - -/* the following main function will be separated when lib is created */ -int main(void) -{ - return random_main(); -} diff --git a/test/validation/random/random.h b/test/validation/random/random.h new file mode 100644 index 0000000..c40ee1f --- /dev/null +++ b/test/validation/random/random.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +int random_main(void); diff --git a/test/validation/random/random_main.c b/test/validation/random/random_main.c new file mode 100644 index 0000000..36b32f7 --- /dev/null +++ b/test/validation/random/random_main.c @@ -0,0 +1,12 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "random.h" + +int main(void) +{ + return random_main(); +} -- 1.9.1 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp