@@ -307,6 +307,7 @@ AC_CONFIG_FILES([Makefile
test/validation/common/Makefile
test/validation/crypto/Makefile
test/validation/pktio/Makefile
+ test/validation/system/Makefile
test/miscellaneous/Makefile
])
@@ -13,6 +13,5 @@ odp_random
odp_scheduler
odp_shared_memory
odp_synchronizers
-odp_time
odp_timer
odp_thread
@@ -16,13 +16,13 @@ EXECUTABLES = odp_buffer \
odp_scheduler \
odp_shared_memory \
odp_synchronizers \
- odp_time \
odp_timer \
odp_thread \
odp_ver_abt_log_dbg
if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = $(EXECUTABLES) \
+ system/system_main
endif
bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
@@ -40,9 +40,6 @@ 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
-odp_time_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
- $(LIB)/libodp.la
-dist_odp_time_SOURCES = odp_time.c
dist_odp_timer_SOURCES = odp_timer.c
dist_odp_packet_SOURCES = odp_packet.c
dist_odp_pool_SOURCES = odp_pool.c
@@ -55,6 +52,7 @@ dist_odp_ver_abt_log_dbg_SOURCES = ver_abt_log_dbg/odp_system.c \
ODP_MODULES = classification \
crypto \
- pktio
+ pktio \
+ system
SUBDIRS = common $(ODP_MODULES)
new file mode 100644
@@ -0,0 +1,2 @@
+system_main
+libsystem.a
new file mode 100644
@@ -0,0 +1,8 @@
+include ../Makefile.inc
+
+noinst_LIBRARIES = libsystem.a
+libsystem_a_SOURCES = system.c
+
+bin_PROGRAMS = system_main
+dist_system_main_SOURCES = system_main.c
+system_main_LDADD = libsystem.a $(LIBCUNIT_COMMON) $(LIBODP)
similarity index 92%
rename from test/validation/odp_time.c
rename to test/validation/system/system.c
@@ -6,6 +6,7 @@
#include <odp.h>
#include "odp_cunit_common.h"
+#include "system.h"
#define TOLERANCE 1
#define BUSY_LOOP_CNT 100
@@ -72,13 +73,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) Note that module system, at this time, only contains time functionality. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- configure.ac | 1 + test/validation/.gitignore | 1 - test/validation/Makefile.am | 10 ++++------ test/validation/system/.gitignore | 2 ++ test/validation/system/Makefile.am | 8 ++++++++ test/validation/{odp_time.c => system/system.c} | 9 ++------- test/validation/system/system.h | 7 +++++++ test/validation/system/system_main.c | 12 ++++++++++++ 8 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 test/validation/system/.gitignore create mode 100644 test/validation/system/Makefile.am rename test/validation/{odp_time.c => system/system.c} (92%) create mode 100644 test/validation/system/system.h create mode 100644 test/validation/system/system_main.c