@@ -284,6 +284,7 @@ AC_CONFIG_FILES([Makefile
test/api_test/Makefile
test/performance/Makefile
test/validation/Makefile
+ test/validation/random/Makefile
test/miscellaneous/Makefile
])
@@ -12,7 +12,6 @@ odp_packet
odp_pktio
odp_pool
odp_queue
-odp_random
odp_scheduler
odp_shared_memory
odp_synchronizers
@@ -15,7 +15,6 @@ EXECUTABLES = odp_buffer \
odp_packet \
odp_pool \
odp_queue \
- odp_random \
odp_scheduler \
odp_shared_memory \
odp_synchronizers \
@@ -29,7 +28,8 @@ COMPILE_ONLY = odp_pktio
TESTSCRIPTS = odp_pktio_run
if test_vald
-TESTS = $(EXECUTABLES) $(TESTSCRIPTS)
+TESTS = random/random_main \
+ $(EXECUTABLES) $(TESTSCRIPTS)
endif
dist_bin_SCRIPTS = odp_pktio_run
@@ -51,8 +51,6 @@ dist_odp_init_SOURCES = odp_init.c
dist_odp_init_abort_SOURCES = odp_init_abort.c
dist_odp_init_log_SOURCES = odp_init_log.c
dist_odp_queue_SOURCES = odp_queue.c $(ODP_CU_COMMON)
-odp_random_CFLAGS = $(AM_CFLAGS) -DMODULE_HAS_OWN_MAIN
-dist_odp_random_SOURCES = odp_random.c $(ODP_CU_COMMON)
dist_odp_scheduler_SOURCES = odp_scheduler.c $(ODP_CU_COMMON)
dist_odp_shared_memory_SOURCES = odp_shared_memory.c $(ODP_CU_COMMON)
dist_odp_synchronizers_SOURCES = odp_synchronizers.c $(ODP_CU_COMMON)
@@ -67,3 +65,6 @@ 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 \
ver_abt_log_dbg/odp_ver_abt_log_dbg.c $(ODP_CU_COMMON)
+
+ODP_MODULES = random
+SUBDIRS = $(ODP_MODULES)
new file mode 100644
@@ -0,0 +1,4 @@
+*.log
+*.trs
+librandom.a
+random_main
new file mode 100644
@@ -0,0 +1,12 @@
+include $(top_srcdir)/test/Makefile.inc
+
+AM_CFLAGS += -I$(top_srcdir)/test/validation/common
+AM_LDFLAGS += -static
+
+noinst_LIBRARIES = librandom.a
+librandom_a_CFLAGS = $(AM_CFLAGS) -DMODULE_HAS_OWN_MAIN
+librandom_a_SOURCES = random.c ../common/odp_cunit_common.c
+
+check_PROGRAMS = random_main
+dist_random_main_SOURCES = random_main.c
+random_main_LDADD = librandom.a $(LIB)/libodp.la
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 seperated 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 | 9 +++++---- test/validation/random/.gitignore | 4 ++++ test/validation/random/Makefile.am | 12 ++++++++++++ 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, 43 insertions(+), 12 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