diff options
author | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-06-15 09:42:30 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-06-18 07:28:28 -0500 |
commit | f69d88ed1f9f19c8ba7ab135d654695c7e5fea8f (patch) | |
tree | 5573b97764ad6172eeefbcf0e6cf049d6a172131 /mpm | |
parent | 601423339493165d72eb6ba5d5f64cd9e3cc1a85 (diff) | |
download | uhd-f69d88ed1f9f19c8ba7ab135d654695c7e5fea8f.tar.gz uhd-f69d88ed1f9f19c8ba7ab135d654695c7e5fea8f.tar.bz2 uhd-f69d88ed1f9f19c8ba7ab135d654695c7e5fea8f.zip |
mpm: tests: Add lib/ to library load path
Ensure that DYLD_LIBRARY_PATH on OS X or LD_LIBRARY_PATH on Linux
platforms is set appropriately before invoking MPM's Python unit tests.
Diffstat (limited to 'mpm')
-rwxr-xr-x | mpm/python/tests/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mpm/python/tests/CMakeLists.txt b/mpm/python/tests/CMakeLists.txt index 36bff9d3a..2a08c2f0b 100755 --- a/mpm/python/tests/CMakeLists.txt +++ b/mpm/python/tests/CMakeLists.txt @@ -7,10 +7,17 @@ ######################################################################## # This file included, use CMake directory variables ######################################################################## - add_test( NAME mpm_unit_tests COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_BINARY_DIR}/python ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/run_unit_tests.py ${MPM_DEVICE} ) + +if(APPLE) + set_tests_properties(mpm_unit_tests PROPERTIES + ENVIRONMENT "DYLD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib:$DYLD_LIBRARY_PATH") +else() + set_tests_properties(mpm_unit_tests PROPERTIES + ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib:$LD_LIBRARY_PATH") +endif() |