aboutsummaryrefslogtreecommitdiffstats
path: root/.ci/templates
diff options
context:
space:
mode:
authorMatthew Crymble <matthew.crymble@ni.com>2022-04-19 00:41:47 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2022-06-10 13:24:04 -0500
commitde9cf6fc2c54f2c31281f76844989577881d81b5 (patch)
treebf0475ffd71c33e0b6684b5141de9e55e8e3977c /.ci/templates
parentedb64f7402bf7ceb33b589d9f5480ef6890f74bb (diff)
downloaduhd-de9cf6fc2c54f2c31281f76844989577881d81b5.tar.gz
uhd-de9cf6fc2c54f2c31281f76844989577881d81b5.tar.bz2
uhd-de9cf6fc2c54f2c31281f76844989577881d81b5.zip
tests: streaming: add support for more DUTs
This commit enables runs for X310, X310 TwinRx, E320, and N310. By default, python's argparse module will expect a value to be provided for each argument defined. Specifying an nargs value of '?' for the pytest options allows us to use a single pytest invocation in our pipeline configuration, even though some options don't apply to some DUT types.
Diffstat (limited to '.ci/templates')
-rw-r--r--.ci/templates/job-uhd-streaming-tests-beauty.yml34
-rw-r--r--.ci/templates/job-uhd-streaming-tests.yml52
2 files changed, 67 insertions, 19 deletions
diff --git a/.ci/templates/job-uhd-streaming-tests-beauty.yml b/.ci/templates/job-uhd-streaming-tests-beauty.yml
index 2852c9644..6bfeaa2e5 100644
--- a/.ci/templates/job-uhd-streaming-tests-beauty.yml
+++ b/.ci/templates/job-uhd-streaming-tests-beauty.yml
@@ -25,10 +25,17 @@ jobs:
# beauty-N320-0 XG:
# dutName: 'beauty-N320-0'
# dutType: 'N320'
- # dutAddr: '192.168.10.2'
- # dutSecondAddr: '192.168.20.2'
+ # dutAddr: '192.168.10.4'
+ # dutSecondAddr: '192.168.20.4'
# dutMgmtAddr: '10.0.57.13'
- # dutFPGA:'XG'
+ # dutFPGA: 'XG'
+ beauty-X310-0:
+ dutName: 'beauty-X310-0'
+ dutType: 'X310'
+ dutAddr: '192.168.10.3'
+ dutSecondAddr: '192.168.20.3'
+ dutMgmtAddr: ''
+ dutFPGA: 'XG'
# beauty-X410-0 X4_200:
# dutName: 'beauty-X410-0'
# dutType: 'x4xx'
@@ -45,3 +52,24 @@ jobs:
dutFPGA: 'CG_400'
dutEmbeddedImagesArtifact: 'x4xx-images'
uartSerial: '2516351E2C9A'
+ # beauty-E320-0:
+ # dutName: 'beauty-E320-0'
+ # dutType: 'E320'
+ # dutAddr: '192.168.10.5'
+ # dutSecondAddr: ''
+ # dutMgmtAddr: '10.0.57.38'
+ # dutFPGA: 'XG'
+ # beauty-N310-0:
+ # dutName: 'beauty-N310-0'
+ # dutType: 'N310'
+ # dutAddr: '192.168.10.6'
+ # dutSecondAddr: '192.168.20.6'
+ # dutMgmtAddr: '10.0.57.31'
+ # dutFPGA: 'XG'
+ # beauty-X310_TwinRx-0:
+ # dutName: 'beauty-X310_TwinRx-0'
+ # dutType: 'X310_TwinRx'
+ # dutAddr: '192.168.10.7'
+ # dutSecondAddr: '192.168.20.7'
+ # dutMgmtAddr: ''
+ # dutFPGA: 'XG'
diff --git a/.ci/templates/job-uhd-streaming-tests.yml b/.ci/templates/job-uhd-streaming-tests.yml
index d0caf5a7a..aca08cad2 100644
--- a/.ci/templates/job-uhd-streaming-tests.yml
+++ b/.ci/templates/job-uhd-streaming-tests.yml
@@ -28,7 +28,7 @@ parameters:
jobs:
- job: uhd_streaming_tests_${{ parameters.suiteName }}
displayName: uhd streaming tests ${{ parameters.suiteName }}
- timeoutInMinutes: 180
+ timeoutInMinutes: 300
pool:
name: de-dre-lab
demands:
@@ -56,10 +56,12 @@ jobs:
rm -rf $(uhd_artifact_directory)/$(dutEmbeddedImagesArtifact)
rm -rf $(uhd_artifact_directory)/uhddev-${{ parameters.testOS }}-${{ parameters.toolset }}
displayName: Cleanup from prior run
+ condition: and(succeeded(), eq(variables.dutType, 'x4xx'))
- download: ${{ parameters.uhdArtifactSource }}
artifact: $(dutEmbeddedImagesArtifact)
displayName: Download $(dutEmbeddedImagesArtifact)
+ condition: and(succeeded(), eq(variables.dutType, 'x4xx'))
- task: ExtractFiles@1
inputs:
@@ -68,6 +70,7 @@ jobs:
cleanDestinationFolder: false
overwriteExistingFiles: true
displayName: Extract JTAG artifact
+ condition: and(succeeded(), eq(variables.dutType, 'x4xx'))
- download: ${{ parameters.uhdArtifactSource }}
artifact: uhddev-${{ parameters.testOS }}-${{ parameters.toolset }}
@@ -91,12 +94,14 @@ jobs:
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.dutType, 'x4xx'))
- script: |
source ${{ parameters.xilinxLocation }}/settings64.sh
source $USRP_EMB_VENV/bin/activate
usrp_emb_x4xx_mender_update
displayName: Update device using Mender
+ condition: and(succeeded(), eq(variables.dutType, 'x4xx'))
- script: |
source $USRP_EMB_VENV/bin/activate
@@ -104,6 +109,7 @@ jobs:
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.dutType, 'x4xx'))
# Setting the timezone on the embedded device is
# required to make the test runtimes to look sane.
@@ -112,37 +118,50 @@ jobs:
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.dutType, 'x4xx'))
- script: |
sleep 60
displayName: Wait for device to finish booting
+ condition: and(succeeded(), eq(variables.dutType, 'x4xx'))
- 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=$(dutType),fpga=$(dutFPGA)"
sleep 60
displayName: Flash FPGA $(dutFPGA)
+ condition: and(succeeded(), eq(variables.dutType, 'x4xx'))
- script: |
+ export UHD_IMAGES_DIR=$(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images
+ $(Build.BinariesDirectory)/uhddev/build-installed/bin/uhd_images_downloader -t b2xx -t fw
+ $(Build.BinariesDirectory)/uhddev/build-installed/bin/uhd_images_downloader -t b210 -t fpga
+ displayName: Download B210 images
+ condition: and(succeeded(), eq(variables.dutType, 'B210'))
+ - 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"
ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "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
- # sleep 5
- # displayName: setup interfaces for use without DPDK
- # - script: |
- # set -x
- # export PYTHONPATH=${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
- # cd ${{ parameters.uhdSrcDir }}/host/tests/pytests
- # sudo python3 -m pytest -s test_streaming.py -m "not dpdk" --dut_type $(dutType) --test_length ${{ parameters.testLength }} \
- # --addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $USRP_EMB_TARGET_IP \
- # --uhd_build_dir $(Build.BinariesDirectory)/uhddev/build --junitxml $(Common.TestResultsDirectory)/TEST-$(dutName).xml
- # continueOnError: true
- # displayName: Run streaming tests on $(dutName)
+ - script: |
+ cd ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
+ sudo ./setup.sh --auto
+ sleep 5
+ displayName: setup interfaces for use without DPDK
+ condition: and(succeeded(), not(eq(variables.dutType, 'x4xx')))
+ - script: |
+ 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)
+ continueOnError: true
+ displayName: Run streaming tests on $(dutName)
+ condition: and(succeeded(), not(eq(variables.dutType, 'x4xx')))
- script: |
cd ${{ parameters.uhdSrcDir }}/host/tests/streaming_performance
sudo ./setup.sh --auto --dpdk
@@ -157,11 +176,12 @@ jobs:
sudo -E LD_LIBRARY_PATH=$LD_LIBRARY_PATH PYTHONPATH=$PYTHONPATH python3 -B -m pytest -s test_streaming.py -m "dpdk" \
--dut_type $(dutType) --test_length ${{ parameters.testLength }} \
--uhd_build_dir $(Build.BinariesDirectory)/uhddev/build --junitxml $(Common.TestResultsDirectory)/TEST-$(dutName)-dpdk.xml \
- --addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $(dutMgmtAddr)
+ --addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $(dutMgmtAddr) --name $(dutNameId)
env:
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)
- task: PublishTestResults@2