@@ -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
])
@@ -9,7 +9,6 @@ odp_init_log
odp_packet
odp_pool
odp_queue
-odp_random
odp_scheduler
odp_shared_memory
odp_synchronizers
@@ -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)
@@ -37,7 +37,6 @@ 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 +53,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)
new file mode 100644
@@ -0,0 +1,2 @@
+random_main
+librandom.a
new file mode 100644
@@ -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)
similarity index 82%
rename from test/validation/odp_random.c
rename to 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();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int random_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 "random.h"
+
+int main(void)
+{
+ return random_main();
+}
Module random 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 | 6 +++--- 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(+), 11 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