@@ -32,6 +32,9 @@ parameters:
32
32
type : string
33
33
- name : xilinxLocation
34
34
type : string
35
+ - name : dpdkDir
36
+ type : string
37
+ default : ' /'
35
38
36
39
jobs :
37
40
- job : uhd_streaming_tests_${{ parameters.suiteName }}
@@ -316,28 +319,46 @@ jobs:
316
319
# 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
317
320
# then you can get an access violation when using that version of UHD with dpdk on the streaming system
318
321
- script : |
322
+ set -e
319
323
mkdir ${{ parameters.uhdSrcDir }}/host/build
320
324
cd ${{ parameters.uhdSrcDir }}/host/build
325
+ if [ "${{ parameters.dpdkDir }}" != "/" ]; then
326
+ export PKG_CONFIG_PATH="${{ parameters.dpdkDir }}/lib/x86_64-linux-gnu/pkgconfig"
327
+ export LD_LIBRARY_PATH="${{ parameters.dpdkDir }}/lib/x86_64-linux-gnu"
328
+ else
329
+ export LD_LIBRARY_PATH=""
330
+ fi
331
+ echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;isOutput=true]$LD_LIBRARY_PATH"
321
332
cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/uhddev/build-installed ..
322
- make -j8 install
333
+ make -j$(nproc) install
334
+ sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH tests/dpdk_test || true
335
+ utils/uhd_config_info --print-all
336
+ name: dpdk_build
323
337
displayName: build UHD for dpdk installed on test machine
324
- condition: succeeded()
338
+ condition: and( succeeded(), not(eq(variables.dutType, 'B210')) )
325
339
326
340
- script : |
327
341
if [ "$(dutType)" = "x440" ]; then
328
- echo "##vso[task.setvariable variable= config_file] ${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_x440.conf"
329
- echo "Using x440 100 GbE UHD Config File"
342
+ config_file=" ${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_x440.conf"
343
+ echo "Using x440 100 GbE UHD Config File ($config_file) "
330
344
elif [ "$(dutFPGA)" = "CG_400" ]; then
331
- echo "##vso[task.setvariable variable= config_file] ${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE.conf"
332
- echo "Using 100 GbE UHD Config File"
345
+ config_file=" ${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE.conf"
346
+ echo "Using 100 GbE UHD Config File ($config_file) "
333
347
elif [ "$(dutFPGA)" = "UC_200" ]; then
334
- echo "##vso[task.setvariable variable= config_file] ${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_SFP1.conf"
335
- echo "Using 100 GbE SFP1 UHD Config File"
348
+ config_file=" ${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_100GbE_SFP1.conf"
349
+ echo "Using 100 GbE SFP1 UHD Config File ($config_file) "
336
350
else
337
- echo "##vso[task.setvariable variable=config_file]${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_10GbE.conf"
338
- echo "Using 10 GbE UHD Config File"
351
+ config_file="${{ parameters.uhdSrcDir }}/host/tests/pytests/uhd_configs/uhd_dpdk_10GbE.conf"
352
+ echo "Using 10 GbE UHD Config File ($config_file)"
353
+ fi
354
+ echo "##vso[task.setvariable variable=config_file]$config_file"
355
+ if [ "${{ parameters.dpdkDir }}" != "/" ]; then
356
+ dpdk_driver=$(find "${{ parameters.dpdkDir }}/lib/x86_64-linux-gnu" -name "pmds-*" -type d)
357
+ echo "Setting dpdk_driver to $dpdk_driver"
358
+ sed -i "s|^dpdk_driver.*|dpdk_driver = $dpdk_driver|" $config_file
339
359
fi
340
360
displayName: select UHD config file for DPDK
361
+ condition: and(succeeded(), not(eq(variables.dutType, 'B210')))
341
362
342
363
- script : |
343
364
echo "##[group]Printing Environment"
@@ -354,7 +375,7 @@ jobs:
354
375
env:
355
376
UHD_CONFIG_FILE: $(config_file)
356
377
PYTHONPATH: ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
357
- LD_LIBRARY_PATH: $(Build.BinariesDirectory)/uhddev/build-installed/lib
378
+ LD_LIBRARY_PATH: $(Build.BinariesDirectory)/uhddev/build-installed/lib:$(dpdk_build.LD_LIBRARY_PATH)
358
379
UHD_IMAGES_DIR: $(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images
359
380
continueOnError: true
360
381
displayName: Run streaming tests with DPDK on $(dutName)
0 commit comments