diff --git a/slsDetectorSoftware/tests/CMakeLists.txt b/slsDetectorSoftware/tests/CMakeLists.txt index d87f17ed0..6a4c03855 100755 --- a/slsDetectorSoftware/tests/CMakeLists.txt +++ b/slsDetectorSoftware/tests/CMakeLists.txt @@ -24,11 +24,16 @@ target_sources(tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/test-Module.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test-Pattern.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test-CtbConfig.cpp - - - ) +# HDF5 file +if (SLS_USE_HDF5) + target_compile_definitions(tests + PUBLIC + -DHDF5C ${HDF5_DEFINITIONS} + ) +endif (SLS_USE_HDF5) + target_include_directories(tests PUBLIC "$" diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-rx.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-rx.cpp index 76462e3c4..51fe04899 100644 --- a/slsDetectorSoftware/tests/Caller/test-Caller-rx.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-rx.cpp @@ -759,6 +759,7 @@ TEST_CASE("rx_roi", "[.cmdcall]") { std::string file_path = "/tmp/test_master_0.json"; REQUIRE(std::filesystem::exists(file_path) == true); +#ifdef HDF5C det.setAcquisitionIndex(0); det.setFileFormat(defs::HDF5); REQUIRE_NOTHROW(caller.call("acquire", {}, -1, PUT)); @@ -766,6 +767,7 @@ TEST_CASE("rx_roi", "[.cmdcall]") { REQUIRE(std::filesystem::exists(file_path) == true); file_path = "/tmp/test_virtual_0.h5"; REQUIRE(std::filesystem::exists(file_path) == true); +#endif det.setFileWrite(prev_write); if (!prev_path.empty())