aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules/UHDUnitTest.cmake
diff options
context:
space:
mode:
authorSamuel O'Brien <sam.obrien@ni.com>2020-06-25 15:43:32 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2020-07-16 09:59:25 -0500
commit919a147afcbecace5107a4d0a4da556cfd56df92 (patch)
treec7b5faea5b89069232e7fb9f7cfebe1e495f4bca /host/cmake/Modules/UHDUnitTest.cmake
parentbe6491428db599867129733f73e7ce0ce23e05a7 (diff)
downloaduhd-919a147afcbecace5107a4d0a4da556cfd56df92.tar.gz
uhd-919a147afcbecace5107a4d0a4da556cfd56df92.tar.bz2
uhd-919a147afcbecace5107a4d0a4da556cfd56df92.zip
python: Add bindings for C++ CHDR Parser
This commit adds pybind11 glue code for the userland chdr parsing code introduced in the uhd::utils::chdr namespace. Additionally, it moves some pybind11 adapter code to a common pybind_adaptors.hpp file which originally existed in the cal_python.hpp file. This commit also adds unit tests for the python bindings using a captured wireshark trace which is located in rfnoc_packets_*.py and some handwritten packets in hardcoded_packets.py Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
Diffstat (limited to 'host/cmake/Modules/UHDUnitTest.cmake')
-rw-r--r--host/cmake/Modules/UHDUnitTest.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/host/cmake/Modules/UHDUnitTest.cmake b/host/cmake/Modules/UHDUnitTest.cmake
index b32699e28..76dfdd029 100644
--- a/host/cmake/Modules/UHDUnitTest.cmake
+++ b/host/cmake/Modules/UHDUnitTest.cmake
@@ -118,4 +118,6 @@ function(UHD_ADD_PYTEST test_name)
-p "${test_name}.*"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/python"
)
+ set_tests_properties(${test_name} PROPERTIES
+ ENVIRONMENT PYTHONPATH=${CMAKE_SOURCE_DIR}/tests/common)
endfunction(UHD_ADD_PYTEST)