@@ -319,6 +319,7 @@ AC_CONFIG_FILES([Makefile
test/validation/synchronizers/Makefile
test/validation/thread/Makefile
test/validation/time/Makefile
+ test/validation/system/Makefile
test/miscellaneous/Makefile
])
@@ -1,5 +1,4 @@
*.log
*.trs
-odp_system
odp_shared_memory
odp_timer
@@ -5,11 +5,11 @@ AM_CFLAGS += -I$(srcdir)/common
AM_LDFLAGS += -static
EXECUTABLES = odp_shared_memory$(EXEEXT) \
- odp_timer$(EXEEXT) \
- odp_system$(EXEEXT)
+ odp_timer$(EXEEXT)
if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = $(EXECUTABLES) \
+ system/system_main
endif
bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
@@ -19,10 +19,6 @@ ODP_CU_COMMON=common/odp_cunit_common.c
odp_crypto_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/crypto
dist_odp_shared_memory_SOURCES = odp_shared_memory.c
dist_odp_timer_SOURCES = odp_timer.c
-odp_system_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
- $(LIB)/libodp.la
-odp_system_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/system
-dist_odp_system_SOURCES = system/system.c
ODP_MODULES = buffer \
classification \
@@ -38,6 +34,7 @@ ODP_MODULES = buffer \
scheduler \
synchronizers \
thread \
- time
+ time \
+ system
SUBDIRS = common $(ODP_MODULES)
new file mode 100644
@@ -0,0 +1,2 @@
+libsystem.a
+system_main
new file mode 100644
@@ -0,0 +1,8 @@
+include ../Makefile.inc
+
+noinst_LIBRARIES = libsystem.a
+libsystem_a_SOURCES = system.c
+
+bin_PROGRAMS = system_main$(EXEEXT)
+dist_system_main_SOURCES = system_main.c
+system_main_LDADD = libsystem.a $(LIBCUNIT_COMMON) $(LIBODP)
@@ -8,6 +8,7 @@
#include <odp.h>
#include "odp_cunit_common.h"
#include "test_debug.h"
+#include "system.h"
static void system_test_odp_version_numbers(void)
{
@@ -98,13 +99,7 @@ static CU_SuiteInfo system_suites[] = {
CU_SUITE_INFO_NULL,
};
-static int system_main(void)
+int system_main(void)
{
return odp_cunit_run(system_suites);
}
-
-/* the following main function will be separated when lib is created */
-int main(void)
-{
- return system_main();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int system_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 "system.h"
+
+int main(void)
+{
+ return system_main();
+}
Module system 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 | 13 +++++-------- test/validation/system/.gitignore | 2 ++ test/validation/system/Makefile.am | 8 ++++++++ test/validation/system/system.c | 9 ++------- test/validation/system/system.h | 7 +++++++ test/validation/system/system_main.c | 12 ++++++++++++ 8 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 test/validation/system/.gitignore create mode 100644 test/validation/system/Makefile.am create mode 100644 test/validation/system/system.h create mode 100644 test/validation/system/system_main.c