aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorSteven Koo <steven.koo@ni.com>2022-05-25 11:39:52 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2022-06-10 13:24:05 -0500
commit651113ee21a1a1d7432550e6e57b0e1f4bc09744 (patch)
tree842353763468735d370d604f3190f3d4cf7eb79a /host
parentb3ac81878bd86b19df61eada22143de8b9d286fd (diff)
downloaduhd-651113ee21a1a1d7432550e6e57b0e1f4bc09744.tar.gz
uhd-651113ee21a1a1d7432550e6e57b0e1f4bc09744.tar.bz2
uhd-651113ee21a1a1d7432550e6e57b0e1f4bc09744.zip
ci: Add recv and send frame tuning for streaming
This adds the ability to tune the recv and send frames as a parameter. This is useful since some rates will fail with jitter in the system with the default settings. Signed-off-by: Steven Koo <steven.koo@ni.com>
Diffstat (limited to 'host')
-rw-r--r--host/tests/pytests/conftest.py11
-rw-r--r--host/tests/pytests/test_streaming.py16
2 files changed, 26 insertions, 1 deletions
diff --git a/host/tests/pytests/conftest.py b/host/tests/pytests/conftest.py
index 087fd2f8a..c118aa7c5 100644
--- a/host/tests/pytests/conftest.py
+++ b/host/tests/pytests/conftest.py
@@ -56,7 +56,16 @@ def pytest_addoption(parser):
required=True,
type=str,
help="")
-
+ parser.addoption(
+ "--num_recv_frames",
+ type=str,
+ nargs='?',
+ help="configures num_recv_frames parameter")
+ parser.addoption(
+ "--num_send_frames",
+ type=str,
+ nargs='?',
+ help="configures num_send_frames parameter")
def pytest_configure(config):
# register additional markers
diff --git a/host/tests/pytests/test_streaming.py b/host/tests/pytests/test_streaming.py
index 98554640b..beb5f7468 100644
--- a/host/tests/pytests/test_streaming.py
+++ b/host/tests/pytests/test_streaming.py
@@ -242,6 +242,22 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx
if use_dpdk:
device_args += f"use_dpdk=1,mgmt_addr={pytestconfig.getoption('mgmt_addr')},"
+ try:
+ num_recv_frames = pytestconfig.getoption('num_recv_frames')
+ if num_recv_frames:
+ device_args += f"num_recv_frames={num_recv_frames},"
+ except Exception:
+ pass
+
+ try:
+ num_send_frames = pytestconfig.getoption('num_send_frames')
+ if num_send_frames:
+ device_args += f"num_send_frames={num_send_frames},"
+ except Exception:
+ pass
+
+ print("Constructed device_args: " + device_args)
+
# construct benchmark_rate params dictionary
benchmark_rate_params = {
"args": device_args,