Skip to content

Commit

Permalink
ci: enable setting custom DPDK directory
Browse files Browse the repository at this point in the history
  • Loading branch information
joergho committed Oct 2, 2024
1 parent f7f9fa6 commit bdada1e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .ci/templates/job-uhd-streaming-tests-beauty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ parameters:
type: string
- name: testLength
type: string
- name: dpdkDir
type: string
default: '/'

jobs:
- template: job-uhd-streaming-tests.yml
Expand All @@ -27,6 +30,7 @@ jobs:
uhdFpgaArtifactSource: ${{ parameters.uhdFpgaArtifactSource }}
fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
xilinxLocation: /opt/Xilinx/Vivado_Lab/2019.1
dpdkDir: '${{ parameters.dpdkDir }}'
dutMatrix:
# beauty-N320-0 XG:
# dutName: 'beauty-N320-0'
Expand Down
4 changes: 4 additions & 0 deletions .ci/templates/job-uhd-streaming-tests-x440.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ parameters:
type: string
- name: testLength
type: string
- name: dpdkDir
type: string
default: '/'

jobs:
- template: job-uhd-streaming-tests.yml
Expand All @@ -28,6 +31,7 @@ jobs:
uhdFpgaArtifactSource: ${{ parameters.uhdFpgaArtifactSource }}
fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
xilinxLocation: /opt/Xilinx/Vivado_Lab/2023.2
dpdkDir: '${{ parameters.dpdkDir }}'
dutMatrix:
X440-0 CG_400:
dutName: 'streaming-X440-0'
Expand Down
43 changes: 32 additions & 11 deletions .ci/templates/job-uhd-streaming-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ parameters:
type: string
- name: xilinxLocation
type: string
- name: dpdkDir
type: string
default: '/'

jobs:
- job: uhd_streaming_tests_${{ parameters.suiteName }}
Expand Down Expand Up @@ -316,28 +319,46 @@ jobs:
# For example, if the streaming system uses a Mellanox NIC and thus needs Mellanox drivers installed but the agent used to build UHD doesn't
# then you can get an access violation when using that version of UHD with dpdk on the streaming system
- script: |
set -e
mkdir ${{ parameters.uhdSrcDir }}/host/build
cd ${{ parameters.uhdSrcDir }}/host/build
if [ "${{ parameters.dpdkDir }}" != "/" ]; then
export PKG_CONFIG_PATH="${{ parameters.dpdkDir }}/lib/x86_64-linux-gnu/pkgconfig"
export LD_LIBRARY_PATH="${{ parameters.dpdkDir }}/lib/x86_64-linux-gnu"
else
export LD_LIBRARY_PATH=""
fi
echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;isOutput=true]$LD_LIBRARY_PATH"
cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/uhddev/build-installed ..
make -j8 install
make -j$(nproc) install
sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH tests/dpdk_test || true
utils/uhd_config_info --print-all
name: dpdk_build
displayName: build UHD for dpdk installed on test machine
condition: succeeded()
condition: and(succeeded(), not(eq(variables.dutType, 'B210')))
- script: |
if [ "$(dutType)" = "x440" ]; then
echo "##vso[task.setvariable variable=config_file]${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_x440.conf"
echo "Using x440 100 GbE UHD Config File"
config_file="${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_x440.conf"
echo "Using x440 100 GbE UHD Config File ($config_file)"
elif [ "$(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"
config_file="${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE.conf"
echo "Using 100 GbE UHD Config File ($config_file)"
elif [ "$(dutFPGA)" = "UC_200" ]; then
echo "##vso[task.setvariable variable=config_file]${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_SFP1.conf"
echo "Using 100 GbE SFP1 UHD Config File"
config_file="${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_SFP1.conf"
echo "Using 100 GbE SFP1 UHD Config File ($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"
config_file="${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_10GbE.conf"
echo "Using 10 GbE UHD Config File ($config_file)"
fi
echo "##vso[task.setvariable variable=config_file]$config_file"
if [ "${{ parameters.dpdkDir }}" != "/" ]; then
dpdk_driver=$(find "${{ parameters.dpdkDir }}/lib/x86_64-linux-gnu" -name "pmds-*" -type d)
echo "Setting dpdk_driver to $dpdk_driver"
sed -i "s|^dpdk_driver.*|dpdk_driver = $dpdk_driver|" $config_file
fi
displayName: select UHD config file for DPDK
condition: and(succeeded(), not(eq(variables.dutType, 'B210')))
- script: |
echo "##[group]Printing Environment"
Expand All @@ -354,7 +375,7 @@ jobs:
env:
UHD_CONFIG_FILE: $(config_file)
PYTHONPATH: ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
LD_LIBRARY_PATH: $(Build.BinariesDirectory)/uhddev/build-installed/lib
LD_LIBRARY_PATH: $(Build.BinariesDirectory)/uhddev/build-installed/lib:$(dpdk_build.LD_LIBRARY_PATH)
UHD_IMAGES_DIR: $(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images
continueOnError: true
displayName: Run streaming tests with DPDK on $(dutName)
Expand Down
6 changes: 6 additions & 0 deletions .ci/uhd-hardware-test-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ parameters:
- 'smoke'
- 'full'
- 'stress'
- name: dpdkDir
type: string
displayName: DPDK Directory on Agent
default: '/'

resources:
pipelines:
Expand Down Expand Up @@ -136,6 +140,7 @@ stages:
uhdFpgaArtifactSource: uhd_fpga_pipeline
fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
testLength: ${{ parameters.testLength }}
dpdkDir: '${{ parameters.dpdkDir }}'

- stage: test_x440_streaming_stage
displayName: Test X440 Streaming
Expand All @@ -153,6 +158,7 @@ stages:
uhdFpgaArtifactSource: uhd_fpga_pipeline
fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
testLength: ${{ parameters.testLength }}
dpdkDir: '${{ parameters.dpdkDir }}'

- stage: test_uhd_devtest
displayName: Test UHD Devtest
Expand Down

0 comments on commit bdada1e

Please sign in to comment.