diff mbox series

[5/6] build: add "packet framework" libs to optional list

Message ID 20220113173918.2700651-6-bruce.richardson@intel.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers show
Series allow more DPDK libraries to be disabled on build | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Jan. 13, 2022, 5:39 p.m. UTC
Add port, table and pipeline libraries - collectively often known as
the "packet framework" -  to the list of optional libraries, and
ensure tests can build with them disabled.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/meson.build | 20 +++++++++++++-------
 lib/meson.build      |  3 +++
 2 files changed, 16 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/app/test/meson.build b/app/test/meson.build
index a92dd0c1f0..ba62e5e98c 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -135,12 +135,6 @@  test_sources = files(
         'test_stack.c',
         'test_stack_perf.c',
         'test_string_fns.c',
-        'test_table.c',
-        'test_table_acl.c',
-        'test_table_combined.c',
-        'test_table_pipeline.c',
-        'test_table_ports.c',
-        'test_table_tables.c',
         'test_tailq.c',
         'test_thash.c',
         'test_thash_perf.c',
@@ -227,7 +221,6 @@  fast_tests = [
         ['stack_autotest', false],
         ['stack_lf_autotest', false],
         ['string_autotest', true],
-        ['table_autotest', true],
         ['tailq_autotest', true],
         ['ticketlock_autotest', true],
         ['timer_autotest', false],
@@ -358,6 +351,19 @@  if dpdk_conf.has('RTE_LIB_TELEMETRY')
     test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
     fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
 endif
+if dpdk_conf.has('RTE_LIB_PIPELINE')
+# pipeline lib depends on port and table libs, so those must be present
+# if pipeline library is.
+    test_sources += [
+        'test_table.c',
+        'test_table_acl.c',
+        'test_table_combined.c',
+        'test_table_pipeline.c',
+        'test_table_ports.c',
+        'test_table_tables.c',
+    ]
+    fast_tests += [['table_autotest', true]]
+endif
 
 # The following linkages of drivers are required because
 # they are used via a driver-specific API.
diff --git a/lib/meson.build b/lib/meson.build
index ede5199374..dcc1b4d835 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -77,7 +77,10 @@  optional_libs = [
         'metrics',
         'node',
         'pdump',
+        'pipeline',
+        'port',
         'power',
+        'table',
         'vhost',
 ]