diff options
author | Ciro Nishiguchi <ciro.nishiguchi@ni.com> | 2018-10-27 11:10:26 -0500 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-10 17:26:18 -0800 |
commit | fd3f5d011fb99304402cbf3c1e8c596478316119 (patch) | |
tree | 17d98a9879d7dff88227cbe53fab342119963675 /host/tests/CMakeLists.txt | |
parent | e934e56ce2f8ca0c2f843577032f1a22bf938930 (diff) | |
download | uhd-fd3f5d011fb99304402cbf3c1e8c596478316119.tar.gz uhd-fd3f5d011fb99304402cbf3c1e8c596478316119.tar.bz2 uhd-fd3f5d011fb99304402cbf3c1e8c596478316119.zip |
tests: Add benchmark of streaming code paths
Add a benchmark of packet handlers and device3 flow control. Benchmarks
use mock transport objects.
Diffstat (limited to 'host/tests/CMakeLists.txt')
-rw-r--r-- | host/tests/CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt index 4b068321b..1711d0ab2 100644 --- a/host/tests/CMakeLists.txt +++ b/host/tests/CMakeLists.txt @@ -54,6 +54,10 @@ set(test_sources fe_conn_test.cpp ) +set(benchmark_sources + packet_handler_benchmark.cpp +) + #turn each test cpp file into an executable with an int main() function add_definitions(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN) @@ -83,6 +87,7 @@ endif(ENABLE_C_API) include_directories("${CMAKE_SOURCE_DIR}/lib/include") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/common") + #for each source: build an executable, register it as a test foreach(test_source ${test_sources}) get_filename_component(test_name ${test_source} NAME_WE) @@ -92,6 +97,14 @@ foreach(test_source ${test_sources}) UHD_INSTALL(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests) endforeach(test_source) +#for benchmarks, build executable but do not register +foreach(benchmark_source ${benchmark_sources}) + get_filename_component(benchmark_name ${benchmark_source} NAME_WE) + add_executable(${benchmark_name} ${benchmark_source}) + target_link_libraries(${benchmark_name} uhd uhd_test ${Boost_LIBRARIES}) + UHD_INSTALL(TARGETS ${benchmark_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests) +endforeach(benchmark_source) + # Other tests that don't directly link with libuhd: (TODO find a nicer way to do this) include_directories(${CMAKE_BINARY_DIR}/lib/rfnoc/nocscript/) include_directories(${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/) |