aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
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,