diff options
author | Matthew Crymble <matthew.crymble@ni.com> | 2021-11-15 14:57:07 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-11-30 07:33:28 -0800 |
commit | f24d6561a842baffbce9ddcdc9802b98f5fa2af0 (patch) | |
tree | 977e76a8cb93844a0366612da8fae12cb693f0a9 /.ci/templates/job-uhd-streaming-tests.yml | |
parent | df7f65d858f723fa528f6375737e73d127fa9c1b (diff) | |
download | uhd-f24d6561a842baffbce9ddcdc9802b98f5fa2af0.tar.gz uhd-f24d6561a842baffbce9ddcdc9802b98f5fa2af0.tar.bz2 uhd-f24d6561a842baffbce9ddcdc9802b98f5fa2af0.zip |
tests: add automated streaming tests
Diffstat (limited to '.ci/templates/job-uhd-streaming-tests.yml')
-rw-r--r-- | .ci/templates/job-uhd-streaming-tests.yml | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/.ci/templates/job-uhd-streaming-tests.yml b/.ci/templates/job-uhd-streaming-tests.yml new file mode 100644 index 000000000..9a9b3168d --- /dev/null +++ b/.ci/templates/job-uhd-streaming-tests.yml @@ -0,0 +1,83 @@ +parameters: +- name: suiteName + type: string +- name: testOS + type: string + values: + - ubuntu2004 +- name: toolset + type: string + values: + - make +- name: uhdSrcDir + type: string +- name: dutMatrix + type: object +- name: testLength + type: string + values: + - 'smoke' + - 'full' + - 'stress' + +jobs: +- job: uhd_streaming_tests_${{ parameters.suiteName }} + displayName: uhd streaming tests ${{ parameters.suiteName }} + timeoutInMinutes: 180 + pool: + name: de-dre-lab + demands: + - suiteName -equals ${{ parameters.suiteName }} + strategy: + matrix: ${{ parameters.dutMatrix }} + workspace: + clean: outputs + steps: + - checkout: self + clean: true + - 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 ${{ 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 + python3 -m pytest -s test_streaming.py -m "not dpdk" --dut_type $(dutType) --test_length ${{ parameters.testLength }} \ + --addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $(dutMgmtAddr) \ + --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 --dpdk + sleep 5 + displayName: setup interfaces for use with DPDK + - script: | + set -x + export PYTHONPATH=${{ parameters.uhdSrcDir }}/host/tests/streaming_performance + cd ${{ parameters.uhdSrcDir }}/host/tests/pytests + sudo --preserve-env=PYTHONPATH python3 -m pytest -s test_streaming.py -m "dpdk" --dut_type $(dutType) --test_length ${{ parameters.testLength }} \ + --addr $(dutAddr) --second_addr $(dutSecondAddr) --mgmt_addr $(dutMgmtAddr) \ + --uhd_build_dir $(Build.BinariesDirectory)/uhddev/build --junitxml $(Common.TestResultsDirectory)/TEST-$(dutName)-dpdk.xml + continueOnError: true + displayName: Run streaming tests with DPDK on $(dutName) + - 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 + |