Skip to content

Commit

Permalink
Add a test in CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jul 22, 2024
1 parent 54206b8 commit 76c0baa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 49 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/generate-edm4hep-file.yaml

This file was deleted.

7 changes: 3 additions & 4 deletions scripts/createEDM4hepFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import argparse
import sys

frames = 10 # How many frames or events will be written
frames = 3 # How many frames or events will be written
vectorsize = 5 # For vector members, each vector member will have this size
counter = count() # next(counter) will return 0, 1, 2, ...
# used to generate the dummy data
Expand All @@ -25,9 +25,8 @@
except AttributeError:
print("The RNTuple writer from podio is not available but was requested")
sys.exit(1)


writer = podio.root_io.Writer(output_file)
else:
writer = podio.root_io.Writer(output_file)

for i in range(frames):
print(f"Writing frame {i}")
Expand Down
3 changes: 3 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ function(set_test_env _testname)
)
endfunction()

add_test(NAME "Create an EDM4hep data file" COMMAND python ${PROJECT_SOURCE_DIR}/scripts/createEDM4hepFile.py)
set_test_env("Create an EDM4hep data file")

add_executable(write_events write_events.cc)
target_include_directories(write_events PUBLIC ${PROJECT_SOURCE_DIR}/edm4hep )
target_link_libraries(write_events edm4hep podio::podioRootIO)
Expand Down

0 comments on commit 76c0baa

Please sign in to comment.