[v5,06/10] app/test: add test case for scripted telemetry commands

Message ID 20230815151053.996469-7-bruce.richardson@intel.com (mailing list archive)
State New
Headers
Series expand list of optional libraries |

Commit Message

Bruce Richardson Aug. 15, 2023, 3:10 p.m. UTC
  The test script for calling all telemetry commands is not discoverable
by checking the C files for the build. Therefore we need to add it in as
a special-case test in the fast-tests group.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/suites/meson.build             | 30 +++++++++++++++++++++++++
 app/test/{ => suites}/test_telemetry.sh |  0
 2 files changed, 30 insertions(+)
 rename app/test/{ => suites}/test_telemetry.sh (100%)
  

Patch

diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build
index ec74d8adf2..2b428847c6 100644
--- a/app/test/suites/meson.build
+++ b/app/test/suites/meson.build
@@ -72,3 +72,33 @@  foreach suite:test_suites
         endforeach
     endif
 endforeach
+
+# standalone test for telemetry
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
+    test_args = [dpdk_test]
+    test_args += test_no_huge_args
+    if get_option('default_library') == 'shared'
+        test_args += ['-d', dpdk_drivers_build_dir]
+    endif
+    if dpdk_conf.has('RTE_CRYPTO_NULL')
+        test_args += ['--vdev=crypto_null0']
+    endif
+    if dpdk_conf.has('RTE_DMA_SKELETON')
+        test_args += ['--vdev=dma_skeleton0']
+    endif
+    if dpdk_conf.has('RTE_EVENT_SKELETON')
+        test_args += ['--vdev=event_skeleton0']
+    endif
+    if dpdk_conf.has('RTE_NET_NULL')
+        test_args += ['--vdev=net_null0']
+    endif
+    if dpdk_conf.has('RTE_RAW_SKELETON')
+        test_args += ['--vdev=rawdev_skeleton0']
+    endif
+    test_args += ['-a', '0000:00:00.0']
+    test('telemetry_all', find_program('test_telemetry.sh'),
+            args: test_args,
+            timeout : timeout_seconds_fast,
+            is_parallel : false,
+            suite : 'fast-tests')
+endif
diff --git a/app/test/test_telemetry.sh b/app/test/suites/test_telemetry.sh
similarity index 100%
rename from app/test/test_telemetry.sh
rename to app/test/suites/test_telemetry.sh