[2/2] test: fix dependency on pcapng

Message ID 20211108100920.31083-2-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [1/2] build: cleanup libpcap dependent components |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

David Marchand Nov. 8, 2021, 10:09 a.m. UTC
  The unit test code should depend on the pcapng library.

Fixes: 7a944656b33f ("test/pcapng: test pcapng library")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Patch

diff --git a/app/test/meson.build b/app/test/meson.build
index a12eadbb5a..830db76661 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -412,7 +412,10 @@  endif
 
 if dpdk_conf.has('RTE_HAS_LIBPCAP')
     ext_deps += pcap_dep
-    test_sources += 'test_pcapng.c'
+    if dpdk_conf.has('RTE_LIB_PCAPNG')
+        test_deps += 'pcapng'
+        test_sources += 'test_pcapng.c'
+    endif
 endif
 
 if dpdk_conf.has('RTE_LIB_POWER')