[dpdk-dev] [PATCH v2 1/2] tests: Fix unit tests for shared builds

Aaron Conole aconole at redhat.com
Fri Aug 2 23:25:51 CEST 2019


From: Michael Santana <msantana at redhat.com>

Currently many unit tests fail when running tests under shared builds.
This happens because of missing driver dependencies. This is fixed by
explicitly linking in missing drivers for the test application.

before and after (clang):
https://travis-ci.com/Maickii/dpdk-2/jobs/212329160#L623
https://travis-ci.com/Maickii/dpdk-2/jobs/212335912#L620

Suggested-by: Bruce Richardson <bruce.richardson at intel.com>
Suggested-by: David Marchand <david.marchand at redhat.com>
Signed-off-by: Michael Santana <msantana at redhat.com>
Signed-off-by: Aaron Conole <aconole at redhat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 app/test/meson.build | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/app/test/meson.build b/app/test/meson.build
index e8a898eb6..8afd21dff 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -297,6 +297,19 @@ dump_test_names = [
         'dump_memzone',
 ]
 
+# The following linkages are an exception to allow running the
+# unit tests without requiring that the developer install the
+# DPDK libraries.  Explicit linkage in applications should not
+# be used.
+if dpdk_conf.has('RTE_LIBRTE_RING_MEMPOOL')
+	test_deps += 'mempool_ring'
+endif
+if dpdk_conf.has('RTE_LIBRTE_STACK_MEMPOOL')
+	test_deps += 'mempool_stack'
+endif
+if dpdk_conf.has('RTE_LIBRTE_SKELETON_EVENTDEV_PMD')
+	test_deps += 'pmd_skeleton_event'
+endif
 if dpdk_conf.has('RTE_LIBRTE_PDUMP')
 	test_deps += 'pdump'
 endif
-- 
2.21.0



More information about the dev mailing list