diff options
author | Matthew Crymble <matthew.crymble@ni.com> | 2022-05-02 10:48:50 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-06-10 13:24:04 -0500 |
commit | efab53130dd569c92c0b0cc6adeb36a150902624 (patch) | |
tree | 85c1bbbe1b8ed3ebbd99bce8012157ce35ad264e /.ci | |
parent | 3dca991bf74ae08cb8b13e12668eff77d14de601 (diff) | |
download | uhd-efab53130dd569c92c0b0cc6adeb36a150902624.tar.gz uhd-efab53130dd569c92c0b0cc6adeb36a150902624.tar.bz2 uhd-efab53130dd569c92c0b0cc6adeb36a150902624.zip |
tests: streaming: pass the correct LD_LIBRARY_PATH to pytest
We need to run the DPDK streaming tests with elevated permissions,
but using sudo clears the environment before running. This prevented
the streaming tests from accessing the libuhd binaries.
Diffstat (limited to '.ci')
-rw-r--r-- | .ci/templates/job-uhd-streaming-tests.yml | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/.ci/templates/job-uhd-streaming-tests.yml b/.ci/templates/job-uhd-streaming-tests.yml index 8d5d72b3e..d0caf5a7a 100644 --- a/.ci/templates/job-uhd-streaming-tests.yml +++ b/.ci/templates/job-uhd-streaming-tests.yml @@ -154,9 +154,14 @@ jobs: cd ${{ parameters.uhdSrcDir }}/host/tests/pytests # Disable creation of __pycache__ files using -B to avoid errors on clean up during next run # as using sudo below creates them with root priveleges. - sudo --preserve-env=PYTHONPATH python3 -B -m pytest -s test_streaming.py -m "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)-dpdk.xml + 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) + 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 |