aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Meyerhoff <grant.meyerhoff@ni.com>2024-03-30 07:01:44 -0500
committerAki Tomita <121511582+atomita-ni@users.noreply.github.com>2024-04-05 14:34:02 -0500
commit13c68f487f0d758f3e403794fbfbd1b503c44b75 (patch)
tree53c51501220194ad6acc1a866f0e8b01f9b2d2be
parentci: use fpga pipeline artifacts for x4xx testing (diff)
downloaduhd-13c68f487f0d758f3e403794fbfbd1b503c44b75.tar.xz
uhd-13c68f487f0d758f3e403794fbfbd1b503c44b75.zip
ci: use fpga pipeline artifacts for streaming testing
-rw-r--r--.ci/templates/job-uhd-streaming-tests-beauty.yml6
-rw-r--r--.ci/templates/job-uhd-streaming-tests-x440.yml6
-rw-r--r--.ci/templates/job-uhd-streaming-tests.yml41
-rw-r--r--.ci/templates/stages-uhd-pipeline.yml4
-rw-r--r--.ci/uhd-hardware-test-dev.yml4
5 files changed, 60 insertions, 1 deletions
diff --git a/.ci/templates/job-uhd-streaming-tests-beauty.yml b/.ci/templates/job-uhd-streaming-tests-beauty.yml
index b2de2d4a2..4c4fb3466 100644
--- a/.ci/templates/job-uhd-streaming-tests-beauty.yml
+++ b/.ci/templates/job-uhd-streaming-tests-beauty.yml
@@ -8,6 +8,10 @@ parameters:
- name: uhdArtifactSource
type: string
default: current
+- name: uhdFpgaArtifactSource
+ type: string
+- name: fpga_imgs_source
+ type: string
- name: testLength
type: string
@@ -20,6 +24,8 @@ jobs:
toolset: 'make'
uhdSrcDir: '${{ parameters.uhdSrcDir }}'
uhdArtifactSource: ${{ parameters.uhdArtifactSource }}
+ uhdFpgaArtifactSource: ${{ parameters.uhdFpgaArtifactSource }}
+ fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
xilinxLocation: /opt/Xilinx/Vivado_Lab/2019.1
dutMatrix:
# beauty-N320-0 XG:
diff --git a/.ci/templates/job-uhd-streaming-tests-x440.yml b/.ci/templates/job-uhd-streaming-tests-x440.yml
index bdcc67f08..265386b26 100644
--- a/.ci/templates/job-uhd-streaming-tests-x440.yml
+++ b/.ci/templates/job-uhd-streaming-tests-x440.yml
@@ -8,6 +8,10 @@ parameters:
- name: uhdArtifactSource
type: string
default: current
+- name: uhdFpgaArtifactSource
+ type: string
+- name: fpga_imgs_source
+ type: string
- name: testLength
type: string
@@ -21,6 +25,8 @@ jobs:
nicType: '100gbe'
uhdSrcDir: '${{ parameters.uhdSrcDir }}'
uhdArtifactSource: ${{ parameters.uhdArtifactSource }}
+ uhdFpgaArtifactSource: ${{ parameters.uhdFpgaArtifactSource }}
+ fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
xilinxLocation: /opt/Xilinx/Vivado_Lab/2023.2
dutMatrix:
X440-0 CG_400:
diff --git a/.ci/templates/job-uhd-streaming-tests.yml b/.ci/templates/job-uhd-streaming-tests.yml
index cf8d838bc..f30d55b2e 100644
--- a/.ci/templates/job-uhd-streaming-tests.yml
+++ b/.ci/templates/job-uhd-streaming-tests.yml
@@ -26,6 +26,10 @@ parameters:
- name: uhdArtifactSource
type: string
default: current
+- name: uhdFpgaArtifactSource
+ type: string
+- name: fpga_imgs_source
+ type: string
- name: xilinxLocation
type: string
@@ -57,16 +61,39 @@ jobs:
displayName: Set uhddev pipeline artifact location
- script: |
+ if [ "${{ parameters.uhdFpgaArtifactSource }}" = "current" ]; then
+ echo '##vso[task.setvariable variable=uhd_fpga_artifact_directory]'$(Agent.BuildDirectory)
+ else
+ echo '##vso[task.setvariable variable=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-${{ parameters.testOS }}-${{ parameters.toolset }}
displayName: Cleanup from prior run
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
+ - script: |
+ if [ ! -z "${{ parameters.uhdFpgaArtifactSource }}" ]; then
+ rm -rf $(Agent.BuildDirectory)/${{ parameters.uhdFpgaArtifactSource }}
+ fi
+ displayName: Cleanup from prior run
+ condition: eq('${{ parameters.fpga_imgs_source }}', 'FPGA Pipeline')
+
- download: ${{ parameters.uhdArtifactSource }}
artifact: $(dutEmbeddedImagesArtifact)
displayName: Download $(dutEmbeddedImagesArtifact)
condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'))
+ - download: ${{ parameters.uhdFpgaArtifactSource }}
+ patterns: |
+ usrp_$(dutType)*.bit
+ usrp_$(dutType)*.dts
+ usrp_$(dutType)*.rpt
+ displayName: Download FPGA artifacts
+ condition: eq('${{ parameters.fpga_imgs_source }}', 'FPGA Pipeline')
+
- task: ExtractFiles@1
inputs:
archiveFilePatterns: $(uhd_artifact_directory)/$(dutEmbeddedImagesArtifact)/u-boot-jtag-files.zip
@@ -131,6 +158,14 @@ jobs:
- script: |
ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP
+ scp -o StrictHostKeyChecking=no $(uhd_fpga_artifact_directory)/*/usrp_$(dutType)_* root@$USRP_EMB_TARGET_IP:/usr/share/uhd/images/
+ ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "md5sum /usr/share/uhd/images/usrp_$(dutType)_fpga_$(dutFPGA).bit > /usr/share/uhd/images/usrp_$(dutType)_fpga_$(dutFPGA).bit.md5"
+ ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "md5sum /usr/share/uhd/images/usrp_$(dutType)_fpga_$(dutFPGA).dts > /usr/share/uhd/images/usrp_$(dutType)_fpga_$(dutFPGA).dts.md5"
+ displayName: Copy FPGA pipeline images to device
+ condition: and(succeeded(), eq(variables.dutFamily, 'x4xx'), eq('${{ parameters.fpga_imgs_source }}', 'FPGA Pipeline'))
+
+ - 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
@@ -147,7 +182,11 @@ jobs:
- script: |
export UHD_IMAGES_DIR=$(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images
- $(Build.BinariesDirectory)/uhddev/build-installed/bin/uhd_images_downloader -t x310
+ if [ "${{ parameters.fpga_imgs_source }}" = "FPGA Pipeline" ]; then
+ cp $(uhd_fpga_artifact_directory)/*/* $(Build.BinariesDirectory)/uhddev/build-installed/share/uhd/images/
+ else
+ $(Build.BinariesDirectory)/uhddev/build-installed/bin/uhd_images_downloader -t x310
+ fi
openFPGALoader -c digilent --ftdi-serial $(jtagSerial) --ftdi-channel 0 $UHD_IMAGES_DIR/usrp_x310_fpga_$(dutFPGA).bit
EXITCODE=$?
echo "Waiting for device to boot"
diff --git a/.ci/templates/stages-uhd-pipeline.yml b/.ci/templates/stages-uhd-pipeline.yml
index de47c4310..933491970 100644
--- a/.ci/templates/stages-uhd-pipeline.yml
+++ b/.ci/templates/stages-uhd-pipeline.yml
@@ -518,9 +518,13 @@ stages:
parameters:
testOS: ubuntu2004
uhdSrcDir: $(Build.SourcesDirectory)/uhddev
+ uhdFpgaArtifactSource: uhd_fpga_pipeline
+ fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
testLength: ${{ parameters.testLength }}
- template: job-uhd-streaming-tests-x440.yml
parameters:
testOS: ubuntu2204
uhdSrcDir: $(Build.SourcesDirectory)/uhddev
+ uhdFpgaArtifactSource: uhd_fpga_pipeline
+ fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
testLength: ${{ parameters.testLength }}
diff --git a/.ci/uhd-hardware-test-dev.yml b/.ci/uhd-hardware-test-dev.yml
index deba1a674..1883745b1 100644
--- a/.ci/uhd-hardware-test-dev.yml
+++ b/.ci/uhd-hardware-test-dev.yml
@@ -120,6 +120,8 @@ stages:
testOS: ubuntu2004
uhdSrcDir: $(Build.SourcesDirectory)/uhddev
uhdArtifactSource: uhd_mono_pipeline
+ uhdFpgaArtifactSource: uhd_fpga_pipeline
+ fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
testLength: ${{ parameters.testLength }}
- stage: test_x440_streaming_stage
@@ -132,6 +134,8 @@ stages:
testOS: ubuntu2204
uhdSrcDir: $(Build.SourcesDirectory)/uhddev
uhdArtifactSource: uhd_mono_pipeline
+ uhdFpgaArtifactSource: uhd_fpga_pipeline
+ fpga_imgs_source: ${{ parameters.fpga_imgs_source }}
testLength: ${{ parameters.testLength }}
- stage: test_uhd_devtest