@@ -307,6 +307,7 @@ AC_CONFIG_FILES([Makefile
test/validation/common/Makefile
test/validation/crypto/Makefile
test/validation/init/Makefile
+ test/validation/packet/Makefile
test/validation/pktio/Makefile
test/validation/pool/Makefile
test/validation/queue/Makefile
@@ -3,7 +3,6 @@
odp_ver_abt_log_dbg
odp_buffer
odp_cpumask
-odp_packet
odp_scheduler
odp_shared_memory
odp_synchronizers
@@ -6,7 +6,6 @@ AM_LDFLAGS += -static
EXECUTABLES = odp_buffer \
odp_cpumask \
- odp_packet \
odp_scheduler \
odp_shared_memory \
odp_synchronizers \
@@ -15,7 +14,8 @@ EXECUTABLES = odp_buffer \
odp_ver_abt_log_dbg
if test_vald
-TESTS = $(EXECUTABLES)
+TESTS = $(EXECUTABLES) \
+ packet/packet_main
endif
bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
@@ -31,9 +31,6 @@ 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
-odp_packet_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
- $(LIB)/libodp.la
-dist_odp_packet_SOURCES = odp_packet.c
dist_odp_cpumask_SOURCES = odp_cpumask.c
dist_odp_thread_SOURCES = odp_thread.c
odp_ver_abt_log_dbg_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/ver_abt_log_dbg
@@ -45,6 +42,7 @@ ODP_MODULES = classification \
crypto \
init \
queue \
+ packet \
pktio \
pool \
random \
new file mode 100644
@@ -0,0 +1,2 @@
+libpacket.a
+packet_main
new file mode 100644
@@ -0,0 +1,8 @@
+include ../Makefile.inc
+
+noinst_LIBRARIES = libpacket.a
+libpacket_a_SOURCES = packet.c
+
+bin_PROGRAMS = packet_main
+dist_packet_main_SOURCES = packet_main.c
+packet_main_LDADD = libpacket.a $(LIBCUNIT_COMMON) $(LIBODP)
similarity index 99%
rename from test/validation/odp_packet.c
rename to test/validation/packet/packet.c
@@ -8,6 +8,7 @@
#include <odp.h>
#include "odp_cunit_common.h"
+#include "packet.h"
/* Helper macro for CU_TestInfo initialization */
#define _CU_TEST_INFO(test_func) {#test_func, test_func}
@@ -731,13 +732,7 @@ static CU_SuiteInfo packet_suites[] = {
CU_SUITE_INFO_NULL,
};
-static int packet_main(void)
+int packet_main(void)
{
return odp_cunit_run(packet_suites);
}
-
-/* the following main function will be separated when lib is created */
-int main(void)
-{
- return packet_main();
-}
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+int packet_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 "packet.h"
+
+int main(void)
+{
+ return packet_main();
+}
Module packet 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 | 8 +++----- test/validation/packet/.gitignore | 2 ++ test/validation/packet/Makefile.am | 8 ++++++++ test/validation/{odp_packet.c => packet/packet.c} | 9 ++------- test/validation/packet/packet.h | 7 +++++++ test/validation/packet/packet_main.c | 12 ++++++++++++ 8 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 test/validation/packet/.gitignore create mode 100644 test/validation/packet/Makefile.am rename test/validation/{odp_packet.c => packet/packet.c} (99%) create mode 100644 test/validation/packet/packet.h create mode 100644 test/validation/packet/packet_main.c