@@ -313,6 +313,7 @@ AC_CONFIG_FILES([Makefile
test/validation/pool/Makefile
test/validation/queue/Makefile
test/validation/random/Makefile
+ test/validation/scheduler/Makefile
test/validation/system/Makefile
test/miscellaneous/Makefile
])
@@ -2,7 +2,6 @@
*.trs
odp_ver_abt_log_dbg
odp_cpumask
-odp_scheduler
odp_shared_memory
odp_synchronizers
odp_timer
@@ -5,7 +5,6 @@ AM_CFLAGS += -I$(srcdir)/common
AM_LDFLAGS += -static
EXECUTABLES = odp_cpumask$(EXEEXT) \
- odp_scheduler$(EXEEXT) \
odp_shared_memory$(EXEEXT) \
odp_synchronizers$(EXEEXT) \
odp_timer$(EXEEXT) \
@@ -13,7 +12,8 @@ EXECUTABLES = odp_cpumask$(EXEEXT) \
odp_ver_abt_log_dbg$(EXEEXT)
if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = $(EXECUTABLES) \
+ scheduler/scheduler_main
endif
bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
@@ -21,10 +21,6 @@ bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
ODP_CU_COMMON=common/odp_cunit_common.c
odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
-odp_scheduler_LDADD = \
- $(top_builddir)/test/validation/common/libcunit_common.a \
- $(LIB)/libodp.la
-dist_odp_scheduler_SOURCES = odp_scheduler.c
dist_odp_shared_memory_SOURCES = odp_shared_memory.c
dist_odp_synchronizers_SOURCES = odp_synchronizers.c
dist_odp_timer_SOURCES = odp_timer.c
@@ -44,6 +40,7 @@ ODP_MODULES = buffer \
pktio \
pool \
random \
+ scheduler \
system
SUBDIRS = common $(ODP_MODULES)
new file mode 100644
@@ -0,0 +1,2 @@
+libscheduler.a
+scheduler_main
new file mode 100644
@@ -0,0 +1,8 @@
+include ../Makefile.inc
+
+noinst_LIBRARIES = libscheduler.a
+libscheduler_a_SOURCES = scheduler.c
+
+bin_PROGRAMS = scheduler_main$(EXEEXT)
+dist_scheduler_main_SOURCES = scheduler_main.c
+scheduler_main_LDADD = libscheduler.a $(LIBCUNIT_COMMON) $(LIBODP)
similarity index 99%
rename from test/validation/odp_scheduler.c
rename to test/validation/scheduler/scheduler.c
@@ -6,6 +6,7 @@
#include <odp.h>
#include "odp_cunit_common.h"
+#include "scheduler.h"
#define MAX_WORKERS_THREADS 32
#define MSG_POOL_SIZE (4 * 1024 * 1024)
@@ -816,13 +817,7 @@ static CU_SuiteInfo scheduler_suites[] = {
CU_SUITE_INFO_NULL,
};
-static int scheduler_main(void)
+int scheduler_main(void)
{
return odp_cunit_run(scheduler_suites);
}
-
-/* the following main function will be separated when lib is created */
-int main(void)
-{
- return scheduler_main();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int scheduler_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 "scheduler.h"
+
+int main(void)
+{
+ return scheduler_main();
+}
Module scheduler 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/scheduler/.gitignore | 2 ++ test/validation/scheduler/Makefile.am | 8 ++++++++ test/validation/{odp_scheduler.c => scheduler/scheduler.c} | 9 ++------- test/validation/scheduler/scheduler.h | 7 +++++++ test/validation/scheduler/scheduler_main.c | 12 ++++++++++++ 8 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 test/validation/scheduler/.gitignore create mode 100644 test/validation/scheduler/Makefile.am rename test/validation/{odp_scheduler.c => scheduler/scheduler.c} (99%) create mode 100644 test/validation/scheduler/scheduler.h create mode 100644 test/validation/scheduler/scheduler_main.c