[v2,1/2] app/test: load drivers using build directory

Message ID 20220729124256.1384838-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v2,1/2] app/test: load drivers using build directory |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

David Marchand July 29, 2022, 12:42 p.m. UTC
  Since commit 49b536fc3060 ("eal: load only shared libs from driver ...),
we can specify a build directory to the -d option.

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 4 +---
 drivers/meson.build  | 2 ++
 2 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Bruce Richardson July 29, 2022, 1:28 p.m. UTC | #1
On Fri, Jul 29, 2022 at 02:42:55PM +0200, David Marchand wrote:
> Since commit 49b536fc3060 ("eal: load only shared libs from driver ...),
> we can specify a build directory to the -d option.
> 
> Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  

Patch

diff --git a/app/test/meson.build b/app/test/meson.build
index 431c5bd318..861dd92ebd 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -492,9 +492,7 @@  foreach arg : fast_tests
 
     if (get_option('default_library') == 'shared' and
         arg[0] == 'event_eth_tx_adapter_autotest')
-        foreach drv:dpdk_drivers
-            test_args += ['-d', drv.full_path().split('.a')[0] + '.so']
-        endforeach
+        test_args += ['-d', dpdk_drivers_build_dir]
     endif
     if is_linux
         test_args += ['--file-prefix=@0@'.format(arg[0])]
diff --git a/drivers/meson.build b/drivers/meson.build
index b22c2adda7..376a64f4da 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -52,6 +52,8 @@  if cc.has_argument('-Wno-format-truncation')
     default_cflags += '-Wno-format-truncation'
 endif
 
+dpdk_drivers_build_dir = meson.current_build_dir()
+
 foreach subpath:subdirs
     drivers = []
     std_deps = []