aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVirendra Kakade <virendra.kakade@ni.com>2022-04-04 15:49:38 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2022-04-06 09:52:36 -0700
commit03070de5541299d419bf5e42b7118d91fed40433 (patch)
treea1f485ac730b5c0199a65f617a3bd432643be16e
parent483b10fe54c489d438d456180deaf2291a0da88d (diff)
downloaduhd-03070de5541299d419bf5e42b7118d91fed40433.tar.gz
uhd-03070de5541299d419bf5e42b7118d91fed40433.tar.bz2
uhd-03070de5541299d419bf5e42b7118d91fed40433.zip
tests: streaming tests setup
Add auto DUT bitfile configuration. Add special network configuration commands for X410. Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
-rw-r--r--.ci/templates/job-uhd-streaming-tests-beauty.yml23
-rw-r--r--.ci/templates/job-uhd-streaming-tests.yml11
-rw-r--r--host/tests/pytests/conftest.py2
-rw-r--r--host/tests/pytests/test_streaming.py8
4 files changed, 32 insertions, 12 deletions
diff --git a/.ci/templates/job-uhd-streaming-tests-beauty.yml b/.ci/templates/job-uhd-streaming-tests-beauty.yml
index f58101590..3712d5397 100644
--- a/.ci/templates/job-uhd-streaming-tests-beauty.yml
+++ b/.ci/templates/job-uhd-streaming-tests-beauty.yml
@@ -17,15 +17,24 @@ jobs:
toolset: 'make'
uhdSrcDir: '${{ parameters.uhdSrcDir }}'
dutMatrix:
- # beauty-N320-0 XG:
- # dutName: 'beauty-N320-0'
- # dutType: 'N320'
- # dutAddr: '192.168.10.2'
- # dutSecondAddr: '192.168.20.2'
- # dutMgmtAddr: '10.0.57.13'
+ # beauty-N320-0 XG:
+ # dutName: 'beauty-N320-0'
+ # dutType: 'N320'
+ # dutAddr: '192.168.10.2'
+ # dutSecondAddr: '192.168.20.2'
+ # dutMgmtAddr: '10.0.57.13'
+ # dutFPGA:'XG'
+ # beauty-X410-0 X4_200:
+ # dutName: 'beauty-X410-0'
+ # dutType: 'x4xx'
+ # dutAddr: '192.168.10.2'
+ # dutSecondAddr: '192.168.20.2'
+ # dutMgmtAddr: '10.0.57.29'
+ # dutFPGA:'X4_200'
beauty-X410-0 CG_400:
dutName: 'beauty-X410-0'
- dutType: 'X410'
+ dutType: 'x4xx'
dutAddr: '192.168.10.2'
dutSecondAddr: '192.168.20.2'
dutMgmtAddr: '10.0.57.29'
+ dutFPGA: 'CG_400'
diff --git a/.ci/templates/job-uhd-streaming-tests.yml b/.ci/templates/job-uhd-streaming-tests.yml
index f36397b6a..a5387a403 100644
--- a/.ci/templates/job-uhd-streaming-tests.yml
+++ b/.ci/templates/job-uhd-streaming-tests.yml
@@ -43,6 +43,17 @@ jobs:
archiveFilePatterns: $(Pipeline.Workspace)/uhddev-${{ parameters.testOS }}-${{ parameters.toolset }}/uhddev-${{ parameters.testOS }}-${{ parameters.toolset }}.tar.gz
destinationFolder: $(Build.BinariesDirectory)
cleanDestinationFolder: true
+ - script: |
+ ssh-keygen -f ~/.ssh/known_hosts -R $(dutMgmtAddr)
+ ssh -o StrictHostKeyChecking=no -tt root@$(dutMgmtAddr) "uhd_image_loader --args addr=localhost,type=$(dutType),fpga=$(dutFPGA)"
+ sleep 60
+ displayName: Flash FPGA $(dutFPGA)
+ - script: |
+ ssh-keygen -f ~/.ssh/known_hosts -R $(dutMgmtAddr)
+ ssh -o StrictHostKeyChecking=no -tt root@$(dutMgmtAddr) "ethtool -A sfp0 tx on"
+ ssh -o StrictHostKeyChecking=no -tt root@$(dutMgmtAddr) "ethtool -A sfp1 tx on"
+ displayName: Enable Tx Pause Frames on sfp0 and sfp1
+ condition: and(succeeded(), eq(variables.dutType, 'x4xx'), eq(variables.dutFPGA, 'CG_400'))
# - script: |
# cd ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
# sudo ./setup.sh --auto
diff --git a/host/tests/pytests/conftest.py b/host/tests/pytests/conftest.py
index dfca5d69f..eaacb81a3 100644
--- a/host/tests/pytests/conftest.py
+++ b/host/tests/pytests/conftest.py
@@ -7,7 +7,7 @@ dut_type_list = [
"E320",
"X310",
"X310_TwinRx",
- "X410"
+ "x4xx"
]
diff --git a/host/tests/pytests/test_streaming.py b/host/tests/pytests/test_streaming.py
index 741c51a07..0e4b79e63 100644
--- a/host/tests/pytests/test_streaming.py
+++ b/host/tests/pytests/test_streaming.py
@@ -158,7 +158,7 @@ def generate_X310_TwinRx_test_cases(metafunc, test_length):
stress_params = test_length_utils.test_length_params(iterations=2, duration=600)
parametrize_test_length(metafunc, test_length, fast_params, stress_params)
-def generate_X410_test_cases(metafunc, test_length):
+def generate_x4xx_test_cases(metafunc, test_length):
test_cases = [
# Test Lengths dual_SFP rate rx_rate rx_channels tx_rate tx_channels test case ID
# ------------------------------------------------------------------------------------------------------------------------------
@@ -213,8 +213,8 @@ def pytest_generate_tests(metafunc):
generate_X310_test_cases(metafunc, test_length)
elif dut_type.lower() == 'x310_twinrx':
generate_X310_TwinRx_test_cases(metafunc, test_length)
- elif dut_type.lower() == 'x410':
- generate_X410_test_cases(metafunc, test_length)
+ elif dut_type.lower() == 'x4xx':
+ generate_x4xx_test_cases(metafunc, test_length)
def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx_channels,
@@ -252,7 +252,7 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx
# Run X410 streaming tests in multi_streamer mode and high thread priority
# since those settings allow for best performance.
- if dut_type.lower() == "x410":
+ if dut_type.lower() == "x4xx":
benchmark_rate_params["multi_streamer"] = 1
benchmark_rate_params["priority"] = "high"