@@ -1,7 +1,12 @@
include $(top_srcdir)/Makefile.inc
include $(top_srcdir)/platform/@with_platform@/Makefile.inc
LIB = $(top_builddir)/lib
-LDADD = $(LIB)/libodp.la
+
+#in the following line, the libs using the symbols should come before
+#the libs using them! The includer is given a chance to add things before libodp
+#by setting PRE_LDADD before the inclusion.
+LDADD = $(PRE_LDADD) $(LIB)/libodp.la
+
INCFLAGS = -I$(srcdir) \
-I$(top_srcdir)/test \
-I$(top_srcdir)/platform/@with_platform@/include \
@@ -1,13 +1,9 @@
+PRE_LDADD = $(top_builddir)/test/validation/common/libcunit_common_as_main.a
include $(top_srcdir)/test/Makefile.inc
AM_CFLAGS += -I$(srcdir)/common
AM_LDFLAGS += -static
-#warning: in the following line, the libs using the symbols should come before
-#the libs using them!
-LDADD = $(top_builddir)/test/validation/common/libcunit_common_as_main.a \
- $(LIB)/libodp.la
-
TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform} TEST_DIR=${builddir}
EXECUTABLES = odp_buffer \
@@ -62,6 +58,8 @@ dist_odp_shared_memory_SOURCES = odp_shared_memory.c
dist_odp_synchronizers_SOURCES = odp_synchronizers.c
dist_odp_time_SOURCES = odp_time.c
dist_odp_timer_SOURCES = odp_timer.c
+odp_pktio_LDADD = $(top_builddir)/test/validation/common/libcunit_common.a \
+ $(LIB)/libodp.la
dist_odp_pktio_SOURCES = odp_pktio.c
dist_odp_packet_SOURCES = odp_packet.c
dist_odp_pool_SOURCES = odp_pool.c
@@ -688,7 +688,7 @@ static int term_pktio_suite(void)
return ret;
}
-CU_TestInfo pktio_tests[] = {
+static CU_TestInfo pktio_tests[] = {
{"pktio open", test_odp_pktio_open},
{"pktio lookup", test_odp_pktio_lookup},
{"pktio inq", test_odp_pktio_inq},
@@ -704,8 +704,19 @@ CU_TestInfo pktio_tests[] = {
CU_TEST_INFO_NULL
};
-CU_SuiteInfo odp_testsuites[] = {
+static CU_SuiteInfo pktio_suites[] = {
{"Packet I/O",
init_pktio_suite, term_pktio_suite, NULL, NULL, pktio_tests},
CU_SUITE_INFO_NULL
};
+
+static int pktio_main(void)
+{
+ return odp_cunit_run(pktio_suites);
+}
+
+/* the following main function will be separated when lib is created */
+int main(void)
+{
+ return pktio_main();
+}
Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- test/Makefile.inc | 7 ++++++- test/validation/Makefile.am | 8 +++----- test/validation/odp_pktio.c | 15 +++++++++++++-- 3 files changed, 22 insertions(+), 8 deletions(-)