From: Michael Santana Date: Fri, 2 Aug 2019 21:25:51 +0000 (-0400) Subject: test: allow running shared build without installing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9b1c025cfe0a0bbae62bcda867e1ad6ccdf9cd39;p=dpdk.git test: allow running shared build without installing 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 Suggested-by: David Marchand Signed-off-by: Michael Santana Signed-off-by: Aaron Conole Acked-by: Bruce Richardson Reviewed-by: David Marchand Signed-off-by: Thomas Monjalon --- diff --git a/app/test/meson.build b/app/test/meson.build index e8a898eb6a..ec40943bd6 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -297,21 +297,38 @@ dump_test_names = [ 'dump_memzone', ] -if dpdk_conf.has('RTE_LIBRTE_PDUMP') - test_deps += 'pdump' +# The following linkages are an exception to allow running the +# unit tests without requiring that the developer install the +# DPDK libraries. Explicit linkage of drivers (plugin libraries) +# 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 + +# The following linkages of drivers are required because +# they are used via a driver-specific API. if dpdk_conf.has('RTE_LIBRTE_BOND_PMD') test_deps += 'pmd_bond' endif if dpdk_conf.has('RTE_LIBRTE_RING_PMD') test_deps += 'pmd_ring' endif + if dpdk_conf.has('RTE_LIBRTE_POWER') test_deps += 'power' endif if dpdk_conf.has('RTE_LIBRTE_KNI') test_deps += 'kni' endif +if dpdk_conf.has('RTE_LIBRTE_PDUMP') + test_deps += 'pdump' +endif cflags = machine_args if cc.has_argument('-Wno-format-truncation')