mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
631 lines
29 KiB
YAML
631 lines
29 KiB
YAML
parameters:
|
|
- name: toolset
|
|
type: string
|
|
values:
|
|
- make
|
|
default: make
|
|
- name: uhdSrcDir
|
|
type: string
|
|
- name: uhdArtifactSource
|
|
type: string
|
|
default: current
|
|
- name: uhdFpgaArtifactSource
|
|
type: string
|
|
default: current
|
|
- name: testLength
|
|
type: string
|
|
values:
|
|
- 'smoke'
|
|
- 'full'
|
|
- 'stress'
|
|
- name: dpdkVersions
|
|
type: object
|
|
default:
|
|
- '21.11'
|
|
- '23.11'
|
|
- '25.11'
|
|
- name: selectedTests
|
|
type: object
|
|
- name: dutMatrix
|
|
type: object
|
|
default:
|
|
B206:
|
|
timeoutInMinutes: 30
|
|
dutName: 'streaming-b206'
|
|
dutFamily: 'b200'
|
|
dutType: 'B206'
|
|
dutAddr: ''
|
|
dutSecondAddr: ''
|
|
dutFPGA: ''
|
|
dutNameId: 'B206i'
|
|
dutNumRecvFrames: '256'
|
|
dutNumSendFrames: '256'
|
|
dutGetFpgaImagesMethod: 'uhd_images_downloader'
|
|
B210:
|
|
timeoutInMinutes: 30
|
|
dutName: 'streaming-b210'
|
|
dutFamily: 'b200'
|
|
dutType: 'B210'
|
|
dutAddr: ''
|
|
dutSecondAddr: ''
|
|
dutFPGA: ''
|
|
dutNameId: 'MyB210'
|
|
dutNumRecvFrames: '256'
|
|
dutNumSendFrames: '256'
|
|
dutGetFpgaImagesMethod: 'uhd_images_downloader'
|
|
B310:
|
|
timeoutInMinutes: 60
|
|
dutName: 'streaming-b310'
|
|
dutFamily: 'b3xx'
|
|
dutType: 'b310'
|
|
dutFPGA: 'B310'
|
|
dutResource: '$(b310_resource)'
|
|
dutNameId: ''
|
|
dutNumRecvFrames: ''
|
|
dutNumSendFrames: ''
|
|
X310_XG:
|
|
timeoutInMinutes: 120
|
|
dutName: 'streaming-x310'
|
|
dutFamily: 'x300'
|
|
dutType: 'x310'
|
|
dutAddr: '$(x310_dutAddr)'
|
|
dutSecondAddr: '$(x310_dutSecondAddr)'
|
|
dutFPGA: 'XG'
|
|
dutNameId: ''
|
|
dutNumRecvFrames: ''
|
|
dutNumSendFrames: ''
|
|
jtagSerial: '$(x310_jtagSerial)'
|
|
sfpInt0: '$(x310_sfpInt0)'
|
|
sfpInt1: '$(x310_sfpInt1)'
|
|
X410_CG_400:
|
|
timeoutInMinutes: 120
|
|
dutName: 'streaming-x410'
|
|
dutFamily: 'x4xx'
|
|
dutType: 'x410'
|
|
dutAddr: '$(x410_dutAddr)'
|
|
dutSecondAddr: '$(x410_dutSecondAddr)'
|
|
dutFPGA: 'CG_400'
|
|
dutNameId: ''
|
|
dutEmbeddedImagesArtifact: 'x4xx-images'
|
|
uartSerial: '$(x410_uartSerial)'
|
|
dutNumRecvFrames: ''
|
|
dutNumSendFrames: ''
|
|
sfpInt0: '$(x410_sfpInt0)'
|
|
sfpInt1: '$(x410_sfpInt1)'
|
|
X410_UC_200:
|
|
timeoutInMinutes: 120
|
|
dutName: 'streaming-x410'
|
|
dutFamily: 'x4xx'
|
|
dutType: 'x410'
|
|
# UC image: device is reachable only via dutSecondAddr
|
|
dutAddr: '$(x410_dutSecondAddr)'
|
|
dutSecondAddr: '$(x410_dutSecondAddr)'
|
|
dutFPGA: 'UC_200'
|
|
dutNameId: ''
|
|
dutEmbeddedImagesArtifact: 'x4xx-images'
|
|
uartSerial: '$(x410_uartSerial)'
|
|
dutNumRecvFrames: ''
|
|
dutNumSendFrames: ''
|
|
sfpInt0: '$(x410_sfpInt0)'
|
|
sfpInt1: '$(x410_sfpInt1)'
|
|
X440_CG_400:
|
|
timeoutInMinutes: 180
|
|
dutName: 'streaming-x440'
|
|
dutFamily: 'x4xx'
|
|
dutType: 'x440'
|
|
dutNicType: '100gbe'
|
|
dutAddr: '$(x440_dutAddr)'
|
|
dutSecondAddr: '$(x440_dutSecondAddr)'
|
|
dutFPGA: 'CG_400'
|
|
dutNameId: ''
|
|
dutEmbeddedImagesArtifact: 'x4xx-images'
|
|
uartSerial: '$(x440_uartSerial)'
|
|
dutNumRecvFrames: ''
|
|
dutNumSendFrames: ''
|
|
sfpInt0: '$(x440_sfpInt0)'
|
|
sfpInt1: '$(x440_sfpInt1)'
|
|
X440_CG_1600:
|
|
timeoutInMinutes: 180
|
|
dutName: 'streaming-x440'
|
|
dutFamily: 'x4xx'
|
|
dutType: 'x440'
|
|
dutNicType: '100gbe'
|
|
dutAddr: '$(x440_dutAddr)'
|
|
dutSecondAddr: '$(x440_dutSecondAddr)'
|
|
dutFPGA: 'CG_1600'
|
|
dutNameId: ''
|
|
dutEmbeddedImagesArtifact: 'x4xx-images'
|
|
uartSerial: '$(x440_uartSerial)'
|
|
dutNumRecvFrames: ''
|
|
dutNumSendFrames: ''
|
|
sfpInt0: '$(x440_sfpInt0)'
|
|
sfpInt1: '$(x440_sfpInt1)'
|
|
|
|
jobs:
|
|
- ${{ each dutEntry in parameters.dutMatrix }}:
|
|
- ${{ if containsValue(parameters.selectedTests, dutEntry.key) }}:
|
|
- job: uhd_tests_streaming_${{ lower(replace(replace(dutEntry.key, ' ', '_'), '-', '_')) }}
|
|
displayName: uhd streaming tests ${{ dutEntry.key }}
|
|
timeoutInMinutes: ${{ coalesce(dutEntry.value.timeoutInMinutes, 150) }}
|
|
pool:
|
|
name: de-dre-lab
|
|
demands:
|
|
- streaming_${{ dutEntry.value.dutType }}
|
|
variables:
|
|
dutName: ${{ dutEntry.value.dutName }}
|
|
dutFamily: ${{ dutEntry.value.dutFamily }}
|
|
dutType: ${{ dutEntry.value.dutType }}
|
|
dutNicType: ${{ dutEntry.value.dutNicType }}
|
|
dutAddr: ${{ dutEntry.value.dutAddr }}
|
|
dutSecondAddr: ${{ dutEntry.value.dutSecondAddr }}
|
|
dutFPGA: ${{ dutEntry.value.dutFPGA }}
|
|
dutResource: ${{ dutEntry.value.dutResource }}
|
|
dutNameId: ${{ dutEntry.value.dutNameId }}
|
|
dutNumRecvFrames: ${{ dutEntry.value.dutNumRecvFrames }}
|
|
dutNumSendFrames: ${{ dutEntry.value.dutNumSendFrames }}
|
|
dutGetFpgaImagesMethod: ${{ dutEntry.value.dutGetFpgaImagesMethod }}
|
|
dutEmbeddedImagesArtifact: ${{ dutEntry.value.dutEmbeddedImagesArtifact }}
|
|
uartSerial: ${{ dutEntry.value.uartSerial }}
|
|
jtagSerial: ${{ dutEntry.value.jtagSerial }}
|
|
sfpInt0: ${{ dutEntry.value.sfpInt0 }}
|
|
sfpInt1: ${{ dutEntry.value.sfpInt1 }}
|
|
workspace:
|
|
clean: outputs
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
|
|
- checkout: meta-ettus
|
|
clean: true
|
|
|
|
- checkout: ettus-rts
|
|
clean: true
|
|
|
|
- script: |
|
|
if [ "${{ parameters.uhdArtifactSource }}" = "current" ]; then
|
|
echo '##vso[task.setvariable variable=uhd_artifact_directory]'$(Agent.BuildDirectory)
|
|
else
|
|
echo '##vso[task.setvariable variable=uhd_artifact_directory]'$(Agent.BuildDirectory)/${{ parameters.uhdArtifactSource }}
|
|
fi
|
|
displayName: Set uhddev pipeline artifact location
|
|
|
|
- script: |
|
|
if [ "${{ parameters.uhdFpgaArtifactSource }}" = "current" ]; then
|
|
echo '##vso[task.setvariable variable=uhd_fpga_artifact_directory]'$(Agent.BuildDirectory)
|
|
echo "uhd_fpga_artifact_directory=$(Agent.BuildDirectory)"
|
|
else
|
|
echo '##vso[task.setvariable variable=uhd_fpga_artifact_directory]'$(Agent.BuildDirectory)/${{ parameters.uhdFpgaArtifactSource }}
|
|
echo "uhd_fpga_artifact_directory=$(Agent.BuildDirectory)/${{ parameters.uhdFpgaArtifactSource }}"
|
|
fi
|
|
displayName: Set uhddev FPGA pipeline artifact location
|
|
|
|
- script: |
|
|
rm -rf $(uhd_artifact_directory)/$(dutEmbeddedImagesArtifact)
|
|
rm -rf $(uhd_artifact_directory)/uhddev-$(testOS)-${{ parameters.toolset }}
|
|
displayName: Cleanup from prior run
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
|
|
|
|
- download: ${{ parameters.uhdArtifactSource }}
|
|
artifact: $(dutEmbeddedImagesArtifact)
|
|
displayName: Download $(dutEmbeddedImagesArtifact)
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
|
|
|
|
- script: |
|
|
if [[ -n "$(dutFPGA)" ]]; then
|
|
FPGA_NAME=usrp_$(dutType)_fpga_$(dutFPGA)
|
|
FPGA_ARTIFACT=$(dutType)_$(dutFPGA)
|
|
else
|
|
FPGA_NAME=usrp_$(dutType)_fpga
|
|
FPGA_ARTIFACT=$(dutType)
|
|
fi
|
|
echo '##vso[task.setvariable variable=FPGA_NAME]'$FPGA_NAME
|
|
echo FPGA_NAME=$FPGA_NAME
|
|
echo '##vso[task.setvariable variable=FPGA_ARTIFACT]'$FPGA_ARTIFACT
|
|
echo FPGA_ARTIFACT=$FPGA_ARTIFACT
|
|
if [ "$(dutGetFpgaImagesMethod)" = "uhd_images_downloader" ]; then
|
|
UHD_IMAGES_DIR=$(Agent.BuildDirectory)/uhd-images
|
|
else
|
|
UHD_IMAGES_DIR=$(uhd_fpga_artifact_directory)/$FPGA_ARTIFACT
|
|
fi
|
|
echo '##vso[task.setvariable variable=UHD_IMAGES_DIR]'$UHD_IMAGES_DIR
|
|
echo UHD_IMAGES_DIR=$UHD_IMAGES_DIR
|
|
displayName: Set FPGA variables
|
|
|
|
- script: |
|
|
rm -rf $(UHD_IMAGES_DIR)
|
|
mkdir -p $(UHD_IMAGES_DIR)
|
|
displayName: Create empty UHD images directory
|
|
|
|
- download: ${{ parameters.uhdFpgaArtifactSource }}
|
|
artifact: $(FPGA_ARTIFACT)
|
|
displayName: Download FPGA images (from artifacts)
|
|
condition: and(not(or(failed(), canceled())), ne(variables.dutGetFpgaImagesMethod, 'uhd_images_downloader'), not(eq(variables.dutFamily, 'b3xx')))
|
|
|
|
- task: ExtractFiles@1
|
|
inputs:
|
|
archiveFilePatterns: $(uhd_artifact_directory)/$(dutEmbeddedImagesArtifact)/u-boot-jtag-files.zip
|
|
destinationFolder: $(uhd_artifact_directory)/$(dutEmbeddedImagesArtifact)
|
|
cleanDestinationFolder: false
|
|
overwriteExistingFiles: true
|
|
displayName: Extract JTAG artifact
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
|
|
|
|
- download: ${{ parameters.uhdArtifactSource }}
|
|
artifact: uhddev-$(testOS)-${{ parameters.toolset }}
|
|
displayName: Download uhddev-$(testOS)-${{ parameters.toolset }} artifact
|
|
|
|
- task: ExtractFiles@1
|
|
inputs:
|
|
archiveFilePatterns: $(uhd_artifact_directory)/uhddev-$(testOS)-${{ parameters.toolset }}/uhddev-$(testOS)-${{ parameters.toolset }}.tar.gz
|
|
destinationFolder: $(Build.BinariesDirectory)
|
|
cleanDestinationFolder: true
|
|
displayName: Extract uhddev-$(testOS)-${{ parameters.toolset }} artifact
|
|
|
|
- script: |
|
|
DUTTYPE=$(dutType)
|
|
# in the following, "${DUTTYPE,,}" is used as lower case version of "$(dutType)"
|
|
if [ "$(dutFamily)" = "b200" ]; then
|
|
$(Build.BinariesDirectory)/uhddev/build-installed/bin/uhd_images_downloader -t b2xx -t fw
|
|
fi
|
|
$(Build.BinariesDirectory)/uhddev/build-installed/bin/uhd_images_downloader -t ${DUTTYPE,,} -t fpga
|
|
env:
|
|
UHD_IMAGES_DIR: $(UHD_IMAGES_DIR)
|
|
displayName: Download FPGA images (uhd_images_downloader)
|
|
condition: and(succeeded(), eq(variables.dutGetFpgaImagesMethod, 'uhd_images_downloader'))
|
|
|
|
- script: |
|
|
cd $(Agent.TempDirectory)
|
|
python3 -m venv emb_venv
|
|
source emb_venv/bin/activate
|
|
echo '##vso[task.setvariable variable=USRP_EMB_VENV]'$(realpath emb_venv)
|
|
echo '##vso[task.setvariable variable=USRP_EMB_IMAGE_PATH]'$(uhd_artifact_directory)/$(dutEmbeddedImagesArtifact)
|
|
echo '##vso[task.setvariable variable=USRP_EMB_FTDI_SERIAL]'$(uartSerial)
|
|
python3 -m pip install -U pip
|
|
pip3 install wheel
|
|
pip3 install --upgrade $(Build.SourcesDirectory)/meta-ettus-dev/contrib/test/usrp_emb
|
|
displayName: Create usrp_emb venv
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
|
|
|
|
- script: |
|
|
source $USRP_EMB_VENV/bin/activate
|
|
usrp_emb_x4xx_mender_update
|
|
displayName: Update device using Mender
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
|
|
|
|
- script: |
|
|
source $USRP_EMB_VENV/bin/activate
|
|
USRP_EMB_TARGET_IP=$(usrp_emb_x4xx_boot_linux)
|
|
echo Target IP is $USRP_EMB_TARGET_IP
|
|
echo '##vso[task.setvariable variable=USRP_EMB_TARGET_IP]'$USRP_EMB_TARGET_IP
|
|
displayName: Boot target, get mgmt IP
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
|
|
|
|
# Setting the timezone on the embedded device is
|
|
# required to make the test runtimes to look sane.
|
|
- script: |
|
|
export HOST_TIME_ZONE=$(cat /etc/timezone)
|
|
ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "timedatectl set-timezone $HOST_TIME_ZONE"
|
|
displayName: Set timezone to Host
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
|
|
|
|
- script: |
|
|
sleep 60
|
|
displayName: Wait for device to finish booting
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
|
|
|
|
- script: |
|
|
ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP
|
|
scp -o StrictHostKeyChecking=no $UHD_IMAGES_DIR/$FPGA_NAME.* root@$USRP_EMB_TARGET_IP:/usr/share/uhd/images/
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "md5sum /usr/share/uhd/images/$FPGA_NAME.bit > /usr/share/uhd/images/$FPGA_NAME.bit.md5"
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "md5sum /usr/share/uhd/images/$FPGA_NAME.dts > /usr/share/uhd/images/$FPGA_NAME.dts.md5"
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "rm /lib/firmware/x4*.* && systemctl restart usrp-hwd.service"
|
|
displayName: Copy FPGA pipeline images to device
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'), ne(variables.dutGetFpgaImagesMethod, 'uhd_images_downloader'))
|
|
|
|
- script: |
|
|
ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "uhd_image_loader --args addr=localhost,type=$(dutFamily),fpga=$(dutFPGA)"
|
|
EXITCODE=$?
|
|
sleep 60
|
|
exit $EXITCODE
|
|
displayName: Flash FPGA $(dutFPGA)
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
|
|
|
|
- script: |
|
|
openFPGALoader -c digilent --ftdi-serial $(jtagSerial) --ftdi-channel 0 $UHD_IMAGES_DIR/$FPGA_NAME.bit
|
|
EXITCODE=$?
|
|
echo "Waiting for device to boot"
|
|
sleep 30
|
|
exit $EXITCODE
|
|
displayName: Download and update X310 fpga
|
|
condition: and(succeeded(), eq(variables.dutType, 'x310'))
|
|
|
|
- script: |
|
|
ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "ethtool -A sfp0 tx on"
|
|
displayName: Enable Tx Pause Frames on sfp0
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'), in(variables.dutFPGA, 'CG_400', 'CG_1600'))
|
|
|
|
- script: |
|
|
ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "ethtool -A sfp1 tx on"
|
|
displayName: Enable Tx Pause Frames on sfp1
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'), in(variables.dutFPGA, 'CG_400', 'UC_200', 'CG_1600'))
|
|
|
|
- script: |
|
|
ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "ip addr del 192.168.10.2/24 dev sfp0 2>/dev/null || true"
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "ip addr del $(dutAddr)/24 dev sfp0 2>/dev/null || true"
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "ip addr add $(dutAddr)/24 dev sfp0"
|
|
displayName: Setup IP addresses on sfp0
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'), in(variables.dutFPGA, 'CG_400', 'CG_1600'))
|
|
|
|
- script: |
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "ip addr del 192.168.20.2/24 dev sfp1 2>/dev/null || true"
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "ip addr del $(dutSecondAddr)/24 dev sfp1 2>/dev/null || true"
|
|
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "ip addr add $(dutSecondAddr)/24 dev sfp1"
|
|
displayName: Setup IP addresses on sfp1
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'), in(variables.dutFPGA, 'CG_400', 'UC_200', 'CG_1600'))
|
|
|
|
- template: steps-create-pytest-venv.yml
|
|
|
|
- script: |
|
|
cd ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
|
|
if [ "${{ variables.dutNicType }}" = "100gbe" ]; then
|
|
sudo ./setup100gbe.sh --auto -v
|
|
else
|
|
sudo ./setup10gbe.sh --auto -v
|
|
fi
|
|
EXITCODE=$?
|
|
sleep 5
|
|
exit $EXITCODE
|
|
displayName: setup interfaces for use without DPDK
|
|
condition: and(succeeded(), not(in(variables.dutFamily, 'b200', 'b3xx')))
|
|
timeoutInMinutes: 5
|
|
|
|
- script: |
|
|
if [ "$(dutFamily)" = "b3xx" ]; then
|
|
cd ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
|
|
sudo ./setupPCIe.sh -v -s
|
|
EXITCODE=$?
|
|
sleep 5
|
|
exit $EXITCODE
|
|
fi
|
|
displayName: setup B310 PCIe interface
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'b3xx'))
|
|
timeoutInMinutes: 1
|
|
|
|
- script: |
|
|
rm -fv TEST-*
|
|
workingDirectory: $(Common.TestResultsDirectory)
|
|
displayName: remove old test results no dpdk
|
|
|
|
- script: |
|
|
export UHD_IMAGES_DIR=$(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images/
|
|
mkdir -p $(UHD_IMAGES_DIR)
|
|
$(Build.BinariesDirectory)/uhddev/build-installed/bin/uhd_images_downloader -t b3xx -t fw
|
|
echo '##vso[task.setvariable variable=UHD_IMAGES_DIR]'$UHD_IMAGES_DIR
|
|
echo UHD_IMAGES_DIR=$UHD_IMAGES_DIR
|
|
displayName: Set UHD_IMAGES_DIR for B3xx
|
|
condition: and(succeeded(), eq(variables.dutFamily, 'b3xx'))
|
|
|
|
- script: |
|
|
echo "##[group]Printing Environment"
|
|
printenv
|
|
echo "##[endgroup]"
|
|
set -x
|
|
source $PYTEST_VENV/bin/activate
|
|
cd ${{ parameters.uhdSrcDir }}/host/tests/pytests
|
|
export PATH=$(Build.BinariesDirectory)/uhddev/build-installed/bin:$PATH
|
|
# B210, or other usb devices, do not have an address to probe, ignore probe for now as
|
|
# B210 is not currently built by the FPGA pipeline
|
|
if [ -n "$(dutAddr)" ]; then
|
|
uhd_usrp_probe --args addr=$(dutAddr)
|
|
fi
|
|
# 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.
|
|
sudo -E LD_LIBRARY_PATH=$LD_LIBRARY_PATH PYTHONPATH=$PYTHONPATH $PYTEST_VENV/bin/python3 -B -m pytest test_streaming.py -v -m "not dpdk" \
|
|
--capture=tee-sys -o junit_logging=all \
|
|
--dut_type $(dutType) --test_length ${{ parameters.testLength }} \
|
|
--uhd_build_dir $(Build.BinariesDirectory)/uhddev/build --junitxml $(Common.TestResultsDirectory)/TEST-$(dutName)-no_DPDK.xml \
|
|
--addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $USRP_EMB_TARGET_IP --name $(dutNameId) --resource $(dutResource) \
|
|
--result_csv $(Common.TestResultsDirectory)/TEST-$(dutName)-no_DPDK.csv \
|
|
--num_recv_frames $(dutNumRecvFrames) --num_send_frames $(dutNumSendFrames)
|
|
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: $(UHD_IMAGES_DIR)
|
|
continueOnError: true
|
|
displayName: Run no-dpdk streaming tests on $(dutName)
|
|
condition: and(succeeded(), not(eq(variables.dutFamily, 'x4xx')))
|
|
|
|
- script: |
|
|
cd ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
|
|
if [ "${{ variables.dutNicType }}" = "100gbe" ]; then
|
|
sudo ./setup100gbe.sh --ramdisk -v
|
|
else
|
|
sudo ./setup10gbe.sh --ramdisk -v
|
|
fi
|
|
sleep 5
|
|
displayName: setup interfaces for use raw udp streaming
|
|
condition: and(succeeded(), not(in(variables.dutFamily, 'b200', 'b3xx')))
|
|
timeoutInMinutes: 5
|
|
|
|
- script: |
|
|
rm -fv TEST-*
|
|
workingDirectory: $(Common.TestResultsDirectory)
|
|
displayName: remove old test results raw udp
|
|
condition: and(succeeded(), not(in(variables.dutFamily, 'b3xx')))
|
|
|
|
- script: |
|
|
export PYTHON_VERSION=$(python3 -c "import sys; print('python'+str(sys.version_info.major) + '.' + str(sys.version_info.minor))")
|
|
export PYTHONPATH=$(Build.BinariesDirectory)/uhddev/build-installed/lib/$PYTHON_VERSION/site-packages:${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
|
|
echo "##[group]Printing Environment"
|
|
printenv
|
|
echo "##[endgroup]"
|
|
set -x
|
|
source $PYTEST_VENV/bin/activate
|
|
cd ${{ parameters.uhdSrcDir }}/host/tests/pytests
|
|
export PATH=$(Build.BinariesDirectory)/uhddev/build-installed/bin:$PATH
|
|
# B210, or other usb devices, do not have an address to probe, ignore probe for now as
|
|
# B210 is not currently built by the FPGA pipeline
|
|
if [ -n "$(dutAddr)" ]; then
|
|
uhd_usrp_probe --args addr=$(dutAddr)
|
|
fi
|
|
# 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.
|
|
sudo -E LD_LIBRARY_PATH=$LD_LIBRARY_PATH PYTHONPATH=$PYTHONPATH $PYTEST_VENV/bin/python3 -B -m pytest test_raw_udp_streaming.py -v \
|
|
--capture=tee-sys -o junit_logging=all \
|
|
--dut_type $(dutType) --dut_fpga $(dutFPGA) --test_length ${{ parameters.testLength }} \
|
|
--uhd_build_dir $(Build.BinariesDirectory)/uhddev/build-installed/lib/uhd --junitxml $(Common.TestResultsDirectory)/TEST-$(dutName)-raw_udp.xml \
|
|
--addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $USRP_EMB_TARGET_IP --name $(dutNameId) \
|
|
--result_csv $(Common.TestResultsDirectory)/TEST-$(dutName)-raw_udp.csv \
|
|
--num_recv_frames $(dutNumRecvFrames) --num_send_frames $(dutNumSendFrames) --sfp_int0 $(sfpInt0) --sfp_int1 $(sfpInt1)
|
|
env:
|
|
UHD_CONFIG_FILE: $(config_file)
|
|
LD_LIBRARY_PATH: $(Build.BinariesDirectory)/uhddev/build-installed/lib
|
|
UHD_IMAGES_DIR: $(UHD_IMAGES_DIR)
|
|
continueOnError: true
|
|
displayName: Run raw udp streaming tests on $(dutName)
|
|
condition: and(succeeded(), or(eq(variables.dutFamily, 'x4xx'), eq(variables.dutType, 'X310')))
|
|
|
|
- publish: $(Common.TestResultsDirectory)
|
|
artifact: test-logs-streamingtest-$(dutName)-$(dutFpga)-run$(System.JobAttempt)
|
|
displayName: Upload Test Logs with no dpdk
|
|
condition: succeededOrFailed()
|
|
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFormat: 'JUnit'
|
|
testResultsFiles: '$(Common.TestResultsDirectory)/TEST-*.xml'
|
|
testRunTitle: $(dutName) streaming tests
|
|
buildConfiguration: 'Release'
|
|
mergeTestResults: true
|
|
failTaskOnFailedTests: false
|
|
displayName: Upload streaming test results with no dpdk
|
|
|
|
- script: |
|
|
cd ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
|
|
if [ "${{ variables.dutNicType }}" = "100gbe" ]; then
|
|
sudo ./setup100gbe.sh --auto --dpdk -v
|
|
else
|
|
sudo ./setup10gbe.sh --auto --dpdk -v
|
|
fi
|
|
EXITCODE=$?
|
|
sleep 5
|
|
exit $EXITCODE
|
|
displayName: Setup interfaces for use with DPDK
|
|
condition: and(succeeded(), not(in(variables.dutFamily, 'b200', 'b3xx')))
|
|
timeoutInMinutes: 5
|
|
|
|
- ${{ each dpdkVersion in parameters.dpdkVersions }}:
|
|
- bash: |
|
|
if [ -d "/opt/dpdk-${{ dpdkVersion }}" ]; then
|
|
echo "##vso[task.setvariable variable=dpdkDirExists]true"
|
|
else
|
|
echo "##vso[task.setvariable variable=dpdkDirExists]false"
|
|
fi
|
|
displayName: "[DPDK ${{ dpdkVersion }}] Check dpdk dir exists"
|
|
|
|
- script: |
|
|
rm -fv TEST-*
|
|
workingDirectory: $(Common.TestResultsDirectory)
|
|
displayName: "[DPDK ${{ dpdkVersion }}] Remove old test results"
|
|
condition: and(succeeded(), not(eq(variables.dutFamily, 'b200')), eq(variables.dpdkDirExists, 'true'))
|
|
|
|
# This step is needed because the agent used to build UHD that gets installed may have a slightly different dpdk setup.
|
|
# 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 -p ${{ parameters.uhdSrcDir }}/host/build
|
|
cd ${{ parameters.uhdSrcDir }}/host/build
|
|
if [ -e "CMakeCache.txt" ]; then
|
|
echo "Cleaning cmake output from previous run"
|
|
rm -rf CMakeFiles/ CMakeCache.txt
|
|
fi
|
|
if [ "${{ dpdkVersion }}" != "" ]; then
|
|
export PKG_CONFIG_PATH="/opt/dpdk-${{ dpdkVersion }}/lib/x86_64-linux-gnu/pkgconfig"
|
|
export LD_LIBRARY_PATH="/opt/dpdk-${{ dpdkVersion }}/lib/x86_64-linux-gnu"
|
|
else
|
|
export LD_LIBRARY_PATH=""
|
|
fi
|
|
echo "##vso[task.setvariable variable=LD_LIBRARY_PATH_DPDK]$LD_LIBRARY_PATH"
|
|
cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/uhddev/build-installed ..
|
|
make -j$(nproc) install
|
|
sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH UHD_LOG_CONSOLE_LEVEL=debug tests/dpdk_test || true
|
|
utils/uhd_config_info --print-all
|
|
DPDK_VERSION_STRING=$(utils/uhd_config_info --dpdk-version | awk '{print $3;}')
|
|
echo "##vso[task.setvariable variable=DPDK_VERSION_STRING]$DPDK_VERSION_STRING"
|
|
displayName: "[DPDK ${{ dpdkVersion }}] Build UHD for DPDK"
|
|
condition: and(succeeded(), not(in(variables.dutFamily, 'b200', 'b3xx')), eq(variables.dpdkDirExists, 'true'))
|
|
|
|
- script: |
|
|
config_file="$(Agent.TempDirectory)/uhd_dpdk.conf"
|
|
echo "##vso[task.setvariable variable=config_file]$config_file"
|
|
template_file="$HOME/_conf/uhd_dpdk.conf"
|
|
if [ ! -e $template_file ]; then
|
|
echo "UHD DPDK config file expected at $template_file was not found."
|
|
exit 1
|
|
fi
|
|
|
|
source $PYTEST_VENV/bin/activate
|
|
python3 $(Build.SourcesDirectory)/ettus-rts/config/remote/streaming/adapt_uhd_dpdk_config.py \
|
|
--template_path $template_file \
|
|
--dpdk_driver_path /opt/dpdk-${{ dpdkVersion }} \
|
|
--dut_type $(dutType) \
|
|
--fpga_flavor $(dutFPGA) \
|
|
--output_path $config_file
|
|
displayName: "[DPDK ${{ dpdkVersion }}] Provide UHD config file"
|
|
condition: and(succeeded(), not(in(variables.dutFamily, 'b200', 'b3xx')), eq(variables.dpdkDirExists, 'true'))
|
|
|
|
- script: |
|
|
echo "##[group]Printing Environment"
|
|
printenv
|
|
echo "##[endgroup]"
|
|
set -x
|
|
source $PYTEST_VENV/bin/activate
|
|
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.
|
|
sudo -E LD_LIBRARY_PATH=$LD_LIBRARY_PATH PYTHONPATH=$PYTHONPATH $PYTEST_VENV/bin/python3 -B -m pytest test_streaming.py -v -m "dpdk" \
|
|
--capture=tee-sys -o junit_logging=all \
|
|
--dut_type $(dutType) --dut_fpga $(dutFPGA) --test_length ${{ parameters.testLength }} \
|
|
--uhd_build_dir $(Build.BinariesDirectory)/uhddev/build \
|
|
--junitxml $(Common.TestResultsDirectory)/TEST-$(dutName)-dpdk-$(DPDK_VERSION_STRING).xml \
|
|
--result_csv $(Common.TestResultsDirectory)/TEST-$(dutName)-dpdk-$(DPDK_VERSION_STRING).csv \
|
|
--addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $USRP_EMB_TARGET_IP --name $(dutNameId)
|
|
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_DPDK)
|
|
UHD_IMAGES_DIR: $(UHD_IMAGES_DIR)
|
|
continueOnError: true
|
|
displayName: "[DPDK ${{ dpdkVersion }}] Run streaming tests on $(dutName)"
|
|
condition: and(succeeded(), not(in(variables.dutFamily, 'b200', 'b3xx')), eq(variables.dpdkDirExists, 'true'))
|
|
|
|
- publish: $(Common.TestResultsDirectory)
|
|
artifact: test-logs-streamingtest-$(dutName)-$(dutFpga)-dpdk$(DPDK_VERSION_STRING)-run$(System.JobAttempt)
|
|
displayName: "[DPDK ${{ dpdkVersion }}] Upload Test Logs"
|
|
condition: and(succeededOrFailed(), not(in(variables.dutFamily, 'b200', 'b3xx')), eq(variables.dpdkDirExists, 'true'))
|
|
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFormat: 'JUnit'
|
|
testResultsFiles: '$(Common.TestResultsDirectory)/TEST-*.xml'
|
|
testRunTitle: $(dutName) DPDK $(DPDK_VERSION_STRING) streaming tests
|
|
buildConfiguration: 'Release'
|
|
mergeTestResults: true
|
|
failTaskOnFailedTests: false
|
|
displayName: "[DPDK ${{ dpdkVersion }}] Upload streaming test results"
|
|
condition: and(succeededOrFailed(), not(in(variables.dutFamily, 'b200', 'b3xx')), eq(variables.dpdkDirExists, 'true'))
|
|
|
|
- script: |
|
|
echo "A previous step failed. See steps with warnings."
|
|
echo "Marking the overall build status as a failure."
|
|
exit 1
|
|
condition: in(variables['Agent.JobStatus'], 'SucceededWithIssues')
|
|
displayName: Mark build as failure
|