diff options
author | Matthew Crymble <matthew.crymble@ni.com> | 2022-04-21 17:19:52 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-06-10 13:24:04 -0500 |
commit | 09262abca690ef14477f6b5925852a906fb19d5e (patch) | |
tree | 14d2a5b56ee1acca48b054ec2e3ab213f5f7deeb | |
parent | c104c97769e36daa7deb5a4ba03f1f191567fbd9 (diff) | |
download | uhd-09262abca690ef14477f6b5925852a906fb19d5e.tar.gz uhd-09262abca690ef14477f6b5925852a906fb19d5e.tar.bz2 uhd-09262abca690ef14477f6b5925852a906fb19d5e.zip |
tests: streaming: select appropriate uhd config file before test runs
-rw-r--r-- | .ci/templates/job-uhd-streaming-tests.yml | 28 | ||||
-rw-r--r-- | host/tests/pytests/uhd_configs/uhd_dpdk_100GbE.conf | 22 | ||||
-rw-r--r-- | host/tests/pytests/uhd_configs/uhd_dpdk_10GbE.conf | 22 |
3 files changed, 65 insertions, 7 deletions
diff --git a/.ci/templates/job-uhd-streaming-tests.yml b/.ci/templates/job-uhd-streaming-tests.yml index 672802121..326e7f681 100644 --- a/.ci/templates/job-uhd-streaming-tests.yml +++ b/.ci/templates/job-uhd-streaming-tests.yml @@ -151,14 +151,19 @@ jobs: displayName: setup interfaces for use without DPDK condition: and(succeeded(), not(eq(variables.dutType, 'x4xx'))) - script: | + echo "##[group]Printing Environment" + printenv + echo "##[endgroup]" set -x - export PYTHONPATH=${{ parameters.uhdSrcDir }}/host/tests/streaming_performance - export LD_LIBRARY_PATH=$(Build.BinariesDirectory)/uhddev/build/lib:$LD_LIBRARY_PATH - export UHD_IMAGES_DIR=$(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images cd ${{ parameters.uhdSrcDir }}/host/tests/pytests python3 -B -m pytest -s test_streaming.py -m "not dpdk" --dut_type $(dutType) --test_length ${{ parameters.testLength }} \ --uhd_build_dir $(Build.BinariesDirectory)/uhddev/build --junitxml $(Common.TestResultsDirectory)/TEST-$(dutName).xml \ --addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $(dutMgmtAddr) --name $(dutNameId) + env: + UHD_CONFIG_FILE: $(config_file) + PYTHONPATH: ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance + LD_LIBRARY_PATH: $(Build.BinariesDirectory)/uhddev/build-installed/lib + UHD_IMAGES_DIR: $(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images continueOnError: true displayName: Run streaming tests on $(dutName) condition: and(succeeded(), not(eq(variables.dutType, 'x4xx'))) @@ -169,10 +174,19 @@ jobs: displayName: setup interfaces for use with DPDK condition: and(succeeded(), not(eq(variables.dutType, 'B210'))) - script: | + if [ "$(dutFPGA)" = "CG_400" ]; then + echo "##vso[task.setvariable variable=config_file]${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE.conf" + echo "Using 100 GbE UHD Config File" + else + echo "##vso[task.setvariable variable=config_file]${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_10GbE.conf" + echo "Using 10 GbE UHD Config File" + fi + displayName: select UHD config file for DPDK + - script: | + echo "##[group]Printing Environment" + printenv + echo "##[endgroup]" set -x - export PYTHONPATH=${{ parameters.uhdSrcDir }}/host/tests/streaming_performance - export LD_LIBRARY_PATH=$(Build.BinariesDirectory)/uhddev/build/lib:$LD_LIBRARY_PATH - export UHD_IMAGES_DIR=$(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images cd ${{ parameters.uhdSrcDir }}/host/tests/pytests # Disable creation of __pycache__ files using -B to avoid errors on clean up during next run # as using sudo below creates them with root priveleges. @@ -181,10 +195,10 @@ jobs: --uhd_build_dir $(Build.BinariesDirectory)/uhddev/build --junitxml $(Common.TestResultsDirectory)/TEST-$(dutName)-dpdk.xml \ --addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $(dutMgmtAddr) --name $(dutNameId) env: + UHD_CONFIG_FILE: $(config_file) PYTHONPATH: ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance LD_LIBRARY_PATH: $(Build.BinariesDirectory)/uhddev/build-installed/lib UHD_IMAGES_DIR: $(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images - continueOnError: true displayName: Run streaming tests with DPDK on $(dutName) condition: and(succeeded(), not(eq(variables.dutType, 'B210'))) diff --git a/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE.conf b/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE.conf new file mode 100644 index 000000000..088fc2545 --- /dev/null +++ b/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE.conf @@ -0,0 +1,22 @@ +;This is a generated template for uhd.conf +;To apply these changes replace /etc/uhd/uhd.conf with this file. +;Users will likely want to change some of these values to better +;suit their individual system. +;more info here: https://files.ettus.com/manual/page_dpdk.html#dpdk_nic_config +[use_dpdk=1] +dpdk_mtu=9000 +dpdk_corelist=0,1,2 +dpdk_num_mbufs=8192 +dpdk_mbuf_cache_size=64 +dpdk_driver=/usr/local/lib/dpdk-pmds/ + +[dpdk_mac=10:70:fd:1b:ef:bc] +dpdk_lcore = 1 +dpdk_ipv4 = 192.168.10.1/24 +dpdk_num_desc=4096 + +[dpdk_mac=10:70:fd:1b:ef:bd] +dpdk_lcore = 2 +dpdk_ipv4 = 192.168.20.1/24 +dpdk_num_desc=4096 + diff --git a/host/tests/pytests/uhd_configs/uhd_dpdk_10GbE.conf b/host/tests/pytests/uhd_configs/uhd_dpdk_10GbE.conf new file mode 100644 index 000000000..c976b755a --- /dev/null +++ b/host/tests/pytests/uhd_configs/uhd_dpdk_10GbE.conf @@ -0,0 +1,22 @@ +;This is a generated template for uhd.conf +;To apply these changes replace /etc/uhd/uhd.conf with this file. +;Users will likely want to change some of these values to better +;suit their individual system. +;more info here: https://files.ettus.com/manual/page_dpdk.html#dpdk_nic_config +[use_dpdk=1] +dpdk_mtu=9000 +dpdk_corelist=0,1,2 +dpdk_num_mbufs=8192 +dpdk_mbuf_cache_size=64 +dpdk_driver=/usr/local/lib/dpdk-pmds/ + +[dpdk_mac=90:e2:ba:db:53:3c] +dpdk_lcore = 1 +dpdk_ipv4 = 192.168.10.1/24 +dpdk_num_desc=4096 + +[dpdk_mac=90:e2:ba:db:53:3d] +dpdk_lcore = 1 +dpdk_ipv4 = 192.168.20.1/24 +dpdk_num_desc=4096 + |