From 919a147afcbecace5107a4d0a4da556cfd56df92 Mon Sep 17 00:00:00 2001 From: Samuel O'Brien Date: Thu, 25 Jun 2020 15:43:32 -0500 Subject: 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 --- host/cmake/Modules/UHDUnitTest.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host/cmake') 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) -- cgit v1.2.3