diff options
author | Steven Koo <steven.koo@ni.com> | 2021-03-22 11:53:37 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-04-16 15:08:11 -0500 |
commit | 64ea8d91f855bd537cff0bb98560e878819cb6d4 (patch) | |
tree | 435171ae14ebd9050ac0a48aff1ccab789af9628 /.ci/templates | |
parent | 1efdc3a7f6cba76cf475dbc8cc0862981981f9e0 (diff) | |
download | uhd-64ea8d91f855bd537cff0bb98560e878819cb6d4.tar.gz uhd-64ea8d91f855bd537cff0bb98560e878819cb6d4.tar.bz2 uhd-64ea8d91f855bd537cff0bb98560e878819cb6d4.zip |
ci: support for x3xx devtest on rhombus
Rhombus is a test suite that is intended run devtests for multiple
devices in parallel. This commit adds support for x300 and x310
support. This uses redis to mutex access to the hardware between
Azure Pipeline agents. This also updates the fpga using Vivado
over ssh to the host machine.
Signed-off-by: Steven Koo <steven.koo@ni.com>
Diffstat (limited to '.ci/templates')
-rw-r--r-- | .ci/templates/job-uhd-build-src.yml | 12 | ||||
-rw-r--r-- | .ci/templates/job-uhd-devtest-rhombus.yml | 128 | ||||
-rw-r--r-- | .ci/templates/job-uhd-devtest.yml | 91 |
3 files changed, 227 insertions, 4 deletions
diff --git a/.ci/templates/job-uhd-build-src.yml b/.ci/templates/job-uhd-build-src.yml index 6e945d789..366bb7509 100644 --- a/.ci/templates/job-uhd-build-src.yml +++ b/.ci/templates/job-uhd-build-src.yml @@ -65,11 +65,15 @@ jobs: vsArch: $(vsArch) vsYear: $(vsYear) - - task: CopyFiles@2 + - task: ArchiveFiles@2 inputs: - sourceFolder: $(Build.BinariesDirectory) - targetFolder: $(Build.ArtifactStagingDirectory) - displayName: Copy build files to artifact folder + rootFolderOrFile: $(Build.BinariesDirectory) + includeRootFolder: false + archiveType: tar + tarCompression: gz + archiveFile: $(Build.ArtifactStagingDirectory)/$(dockerOSName)-${{ parameters.toolset }}.tar.gz + replaceExistingArchive: true + displayName: Compress build files - task: CopyFiles@2 inputs: diff --git a/.ci/templates/job-uhd-devtest-rhombus.yml b/.ci/templates/job-uhd-devtest-rhombus.yml new file mode 100644 index 000000000..8bcc55054 --- /dev/null +++ b/.ci/templates/job-uhd-devtest-rhombus.yml @@ -0,0 +1,128 @@ +parameters: +- name: testOS + type: string + values: + - ubuntu2004 +- name: uhdSrcDir + type: string + +jobs: +- template: job-uhd-devtest.yml + parameters: + suiteName: 'rhombus' + testOS: '${{ parameters.testOS }}' + knownHost: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE+SZhHi7YOvHW6xmVGhhZGLtqlZoPkOqGdr5WqnmLBN root@ubuntu' + toolset: 'make' + uhdSrcDir: '${{ parameters.uhdSrcDir }}' + redisHost: 'sdr-rhombus' + dutMatrix: + rhombus-x300-UBX-0 XG: + devType: 'x300' + devModel: 'x300' + devName: 'rhombus-x300-UBX-0' + devSerial: '30A6019' + devBus: 'ip' + devAddr: '192.168.40.2' + devFpga: 'XG' + devtestPattern: 'x3x0' + jtagSerial: '2516350A6019' + jtagServer: 'nitest@sdr-rhombus' + rhombus-x310-UBX-0 XG: + devType: 'x300' + devModel: 'x310' + devName: 'rhombus-x310-UBX-0' + devSerial: '3138EF5' + devBus: 'ip' + devAddr: '192.168.40.3' + devFpga: 'XG' + devtestPattern: 'x3x0' + jtagSerial: '251635138E98' + jtagServer: 'nitest@sdr-rhombus' + rhombus-x310-CBX-0 XG: + devType: 'x300' + devModel: 'x310' + devName: 'rhombus-x310-CBX-0' + devSerial: '30796C2' + devBus: 'ip' + devAddr: '192.168.40.4' + devFpga: 'XG' + devtestPattern: 'x3x0' + jtagSerial: '2516350796C2' + jtagServer: 'nitest@sdr-rhombus' + rhombus-x310-WBX-0 XG: + devType: 'x300' + devModel: 'x310' + devName: 'rhombus-x310-WBX-0' + devSerial: '30C5BFF' + devBus: 'ip' + devAddr: '192.168.40.5' + devFpga: 'XG' + devtestPattern: 'x3x0' + jtagSerial: '2516350C5BFF' + jtagServer: 'nitest@sdr-rhombus' + rhombus-x310-SBX-0 XG: + devType: 'x300' + devModel: 'x310' + devName: rhombus-x310-SBX-0 + devSerial: 'F43D13' + devBus: 'ip' + devAddr: '192.168.40.6' + devFpga: 'XG' + devtestPattern: 'x3x0' + jtagSerial: '251635F43D13' + jtagServer: 'nitest@sdr-rhombus' + rhombus-x300-UBX-0 HG: + devType: 'x300' + devModel: 'x300' + devName: 'rhombus-x300-UBX-0' + devSerial: '30A6019' + devBus: 'ip' + devAddr: '192.168.40.2' + devFpga: 'HG' + devtestPattern: 'x3x0' + jtagSerial: '2516350A6019' + jtagServer: 'nitest@sdr-rhombus' + rhombus-x310-UBX-0 HG: + devType: 'x300' + devModel: 'x310' + devName: 'rhombus-x310-UBX-0' + devSerial: '3138EF5' + devBus: 'ip' + devAddr: '192.168.40.3' + devFpga: 'HG' + devtestPattern: 'x3x0' + jtagSerial: '251635138E98' + jtagServer: 'nitest@sdr-rhombus' + rhombus-x310-CBX-0 HG: + devType: 'x300' + devModel: 'x310' + devName: 'rhombus-x310-CBX-0' + devSerial: '30796C2' + devBus: 'ip' + devAddr: '192.168.40.4' + devFpga: 'HG' + devtestPattern: 'x3x0' + jtagSerial: '2516350796C2' + jtagServer: 'nitest@sdr-rhombus' + rhombus-x310-WBX-0 HG: + devType: 'x300' + devModel: 'x310' + devName: 'rhombus-x310-WBX-0' + devSerial: '30C5BFF' + devBus: 'ip' + devAddr: '192.168.40.5' + devFpga: 'HG' + devtestPattern: 'x3x0' + jtagSerial: '2516350C5BFF' + jtagServer: 'nitest@sdr-rhombus' + rhombus-x310-SBX-0 HG: + devType: 'x300' + devModel: 'x310' + devName: rhombus-x310-SBX-0 + devSerial: 'F43D13' + devBus: 'ip' + devAddr: '192.168.40.6' + devFpga: 'HG' + devtestPattern: 'x3x0' + jtagSerial: '251635F43D13' + jtagServer: 'nitest@sdr-rhombus' diff --git a/.ci/templates/job-uhd-devtest.yml b/.ci/templates/job-uhd-devtest.yml new file mode 100644 index 000000000..81733bd88 --- /dev/null +++ b/.ci/templates/job-uhd-devtest.yml @@ -0,0 +1,91 @@ +parameters: +- name: suiteName + type: string +- name: testOS + type: string + values: + - ubuntu2004 +- name: knownHost + type: string +- name: toolset + type: string + values: + - make +- name: uhdSrcDir + type: string +- name: redisHost + type: string +- name: dutMatrix + type: object + +jobs: +- job: uhd_devtest_${{ parameters.suiteName }}_${{ parameters.testOS }} + displayName: uhd devtest ${{ parameters.suiteName }} ${{ parameters.testOS }} + pool: + name: de-dre-lab + demands: + - suiteName -equals ${{ parameters.suiteName }} + - testOS -equals ${{ parameters.testOS }} + variables: + - group: sdr-pipeline-vars + strategy: + matrix: ${{ parameters.dutMatrix }} + workspace: + clean: outputs + steps: + - checkout: self + clean: true + - task: InstallSSHKey@0 + displayName: 'Install Ettus SSH key' + inputs: + knownHostsEntry: '${{ parameters.knownHost }}' + sshPublicKey: '$(ettus_ssh_pubkey)' + sshKeySecureFile: 'id_rsa.ettus' + - download: current + artifact: ${{ parameters.testOS }}-${{ parameters.toolset }} + displayName: Download pipeline artifact ${{ parameters.testOS }}-${{ parameters.toolset }} + - task: ExtractFiles@1 + inputs: + archiveFilePatterns: $(Pipeline.Workspace)/${{ parameters.testOS }}-${{ parameters.toolset }}/${{ parameters.testOS }}-${{ parameters.toolset }}.tar.gz + destinationFolder: $(Build.BinariesDirectory) + cleanDestinationFolder: true + - script: | + cd $(Build.BinariesDirectory)/uhddev/build + mkdir -p fpga_images + rm -rf fpga_images/* + python3 utils/uhd_images_downloader.py -t $(devModel) -i fpga_images \ + -b $(sdr-fileserver) + displayName: Download FPGA Images + - script: | + mkdir -p $(Common.TestResultsDirectory)/devtest + cd $(Common.TestResultsDirectory)/devtest + export PATH=$(Build.BinariesDirectory)/uhddev/build/utils:$(Build.BinariesDirectory)/uhddev/build/examples:$PATH + export LD_LIBRARY_PATH=$(Build.BinariesDirectory)/uhddev/build/lib:$LD_LIBRARY_PATH + python3 ${{ parameters.uhdSrcDir }}/.ci/utils/mutex_hardware.py \ + --jtag_x3xx $(jtagServer),$(jtagSerial),$(Build.BinariesDirectory)/uhddev/build/fpga_images/usrp_$(devModel)_fpga_$(devFpga).bit \ + ${{ parameters.redisHost }} $(devName) \ + "$(Build.BinariesDirectory)/uhddev/build/utils/uhd_usrp_probe --args addr=$(devAddr)" \ + "python3 ${{ parameters.uhdSrcDir }}/host/tests/devtest/run_testsuite.py \ + --src-dir ${{ parameters.uhdSrcDir }}/host/tests/devtest \ + --devtest-pattern $(devtestPattern) --args addr=$(devAddr),type=$(devType) \ + --build-type Release --build-dir $(Build.BinariesDirectory)/uhddev/build \ + --python-interp python3 --xml" + continueOnError: true + condition: and(succeeded(), eq(variables.devType, 'x300'), eq(variables.devBus, 'ip')) + displayName: Run devtest on $(devName) $(devFpga) + - script: | + cd $(Common.TestResultsDirectory)/devtest + python3 ${{ parameters.uhdSrcDir }}/.ci/utils/format_devtest_junitxml.py \ + $(Common.TestResultsDirectory)/devtest \ + $(Common.TestResultsDirectory)/devtest/devtestresults.xml + continueOnError: true + displayName: Format devtest xml + - task: PublishTestResults@2 + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: '$(Common.TestResultsDirectory)/devtest/devtestresults.xml' + testRunTitle: $(devName) $(devFpga) devtest + buildConfiguration: 'Release' + mergeTestResults: true + failTaskOnFailedTests: true + displayName: Upload devtest results |