hdf5 definitions in test when not compiled with hdf5
All checks were successful
Build on RHEL9 / build (push) Successful in 3m38s
Build on RHEL8 / build (push) Successful in 5m4s

This commit is contained in:
2025-07-09 11:18:13 +02:00
parent 34002f5be0
commit d210b0956e
2 changed files with 10 additions and 3 deletions

View File

@ -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
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../src>"

View File

@ -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())