Skip to content

Commit

Permalink
Split RTNtuple based interface tests off to make sanitizers run on them
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener authored and jmcarcell committed May 12, 2024
1 parent dcae94a commit 72cf930
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
3 changes: 3 additions & 0 deletions tests/root_io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if(ENABLE_RNTUPLE)
write_rntuple.cpp
read_rntuple.cpp
read_python_frame_rntuple.cpp
write_interface_rntuple.cpp
read_interface_rntuple.cpp
)
endif()
set(root_libs TestDataModelDict ExtensionDataModelDict podio::podioRootIO podio::podioIO)
Expand All @@ -35,6 +37,7 @@ set_tests_properties(

if(ENABLE_RNTUPLE)
set_property(TEST read_rntuple PROPERTY DEPENDS write_rntuple)
set_property(TEST read_interface_rntuple PROPERTY DEPENDS write_interface_rntuple)
endif()

add_executable(read_frame_legacy_root read_frame_legacy_root.cpp)
Expand Down
10 changes: 10 additions & 0 deletions tests/root_io/read_interface_rntuple.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include "read_interface.h"

int main(int, char**) {
auto reader = podio::makeReader("example_from_rntuple_interface.root");
if (read_frames(reader)) {
return 1;
}

return 0;
}
7 changes: 0 additions & 7 deletions tests/root_io/read_interface_root.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,5 @@ int main(int, char**) {
return 1;
}

#if PODIO_ENABLE_RNTUPLE
auto readerRNTuple = podio::makeReader("example_frame_rntuple_interface.root");
if (read_frames(readerRNTuple)) {
return 1;
}
#endif

return 0;
}
8 changes: 8 additions & 0 deletions tests/root_io/write_interface_rntuple.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "write_interface.h"

int main(int, char**) {
auto writer = podio::makeWriter("example_from_rntuple_interface.root", "rntuple");
write_frames(writer);

return 0;
}
5 changes: 0 additions & 5 deletions tests/root_io/write_interface_root.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,5 @@ int main(int, char**) {
auto writer = podio::makeWriter("example_frame_interface.root");
write_frames(writer);

#if PODIO_ENABLE_RNTUPLE
auto writerRNTuple = podio::makeWriter("example_frame_rntuple_interface.root", "rntuple");
write_frames(writerRNTuple);
#endif

return 0;
}

0 comments on commit 72cf930

Please sign in to comment.