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 | |
parent | df7f65d858f723fa528f6375737e73d127fa9c1b (diff) | |
download | uhd-f24d6561a842baffbce9ddcdc9802b98f5fa2af0.tar.gz uhd-f24d6561a842baffbce9ddcdc9802b98f5fa2af0.tar.bz2 uhd-f24d6561a842baffbce9ddcdc9802b98f5fa2af0.zip |
tests: add automated streaming tests
Diffstat (limited to '.ci')
-rw-r--r-- | .ci/templates/job-uhd-streaming-tests-beauty.yml | 25 | ||||
-rw-r--r-- | .ci/templates/job-uhd-streaming-tests.yml | 83 | ||||
-rw-r--r-- | .ci/templates/stages-uhd-pipeline.yml | 16 | ||||
-rw-r--r-- | .ci/uhd-pipeline-pr.yml | 11 | ||||
-rw-r--r-- | .ci/uhd-pipeline.yml | 11 |
5 files changed, 146 insertions, 0 deletions
diff --git a/.ci/templates/job-uhd-streaming-tests-beauty.yml b/.ci/templates/job-uhd-streaming-tests-beauty.yml new file mode 100644 index 000000000..0f9065830 --- /dev/null +++ b/.ci/templates/job-uhd-streaming-tests-beauty.yml @@ -0,0 +1,25 @@ +parameters: +- name: testOS + type: string + values: + - ubuntu2004 +- name: uhdSrcDir + type: string +- name: testLength + type: string + +jobs: +- template: job-uhd-streaming-tests.yml + parameters: + suiteName: 'beauty' + testOS: '${{ parameters.testOS }}' + testLength: '${{ parameters.testLength }}' + toolset: 'make' + uhdSrcDir: '${{ parameters.uhdSrcDir }}' + dutMatrix: + beauty-N320-0 XG: + dutName: 'beauty-N320-0' + dutType: 'N320' + dutAddr: '192.168.10.2' + dutSecondAddr: '192.168.20.2' + dutMgmtAddr: '10.0.57.13' 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 + diff --git a/.ci/templates/stages-uhd-pipeline.yml b/.ci/templates/stages-uhd-pipeline.yml index f5ff5c227..a67dbed97 100644 --- a/.ci/templates/stages-uhd-pipeline.yml +++ b/.ci/templates/stages-uhd-pipeline.yml @@ -14,6 +14,11 @@ parameters: - name: release_binaries type: boolean default: false +- name: testLength + type: string +- name: run_streaming_tests + type: boolean + default: false variables: - template: ../uhd-pipeline-vars.yml @@ -71,3 +76,14 @@ stages: parameters: testOS: ubuntu2004 uhdSrcDir: $(Build.SourcesDirectory) + +- stage: test_streaming_stage + displayName: Test UHD Streaming + dependsOn: build_uhd_stage + condition: and(succeeded('build_uhd_stage'), ${{ parameters.run_streaming_tests }}) + jobs: + - template: job-uhd-streaming-tests-beauty.yml + parameters: + testOS: ubuntu2004 + uhdSrcDir: $(Build.SourcesDirectory) + testLength: ${{ parameters.testLength }}
\ No newline at end of file diff --git a/.ci/uhd-pipeline-pr.yml b/.ci/uhd-pipeline-pr.yml index 9887214bf..2c1c7d247 100644 --- a/.ci/uhd-pipeline-pr.yml +++ b/.ci/uhd-pipeline-pr.yml @@ -14,6 +14,15 @@ parameters: - name: release_binaries type: boolean default: false +- name: testLength + type: string + values: + - 'smoke' + - 'full' + - 'stress' +- name: run_streaming_tests + type: boolean + default: False trigger: none @@ -38,3 +47,5 @@ extends: custom_boost_version: ${{ parameters.custom_boost_version }} custom_boost_version_url: ${{ parameters.custom_boost_version_url }} release_binaries: ${{ parameters.release_binaries }} + testLength: ${{ parameters.testLength }} + run_streaming_tests: ${{ parameters.run_streaming_tests }} diff --git a/.ci/uhd-pipeline.yml b/.ci/uhd-pipeline.yml index 8ea2eb4f5..b2ffffc6f 100644 --- a/.ci/uhd-pipeline.yml +++ b/.ci/uhd-pipeline.yml @@ -8,6 +8,15 @@ parameters: - name: release_binaries type: boolean default: false +- name: testLength + type: string + values: + - 'smoke' + - 'full' + - 'stress' +- name: run_streaming_tests + type: boolean + default: False trigger: batch: true @@ -31,3 +40,5 @@ extends: template: templates/stages-uhd-pipeline.yml parameters: release_binaries: ${{ parameters.release_binaries }} + testLength: ${{ parameters.testLength }} + run_streaming_tests: ${{ parameters.run_streaming_tests }} |