Skip to content

Commit

Permalink
Add check for complete EDM4hep file
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 6, 2024
1 parent c618b98 commit 4c643dc
Show file tree
Hide file tree
Showing 5 changed files with 499 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/createEDM4hepFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def create_TrackCollection(vectorsize, tracker_hit):
)
state.covMatrix = create_CovMatrixNf(6)
track.addToTrackStates(state)
track.addToSubdetectorHoleNumbers(next(counter))

track.addToTrackerHits(tracker_hit)
track.addToTracks(track)
track.setNholes(next(counter))
Expand Down
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,5 @@ endif()

add_subdirectory(utils)
add_subdirectory(tools)

add_subdirectory(backwards_compat)
11 changes: 11 additions & 0 deletions test/backwards_compat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
add_test(NAME check_complete_file COMMAND pytest --inputfile=${CMAKE_BINARY_DIR}/test/edm4hep_example.root -v)

set_test_env(check_complete_file)

set_tests_properties(
check_complete_file

PROPERTIES
DEPENDS "Create an EDM4hep data file"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
6 changes: 6 additions & 0 deletions test/backwards_compat/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python3
"""pytest config module to make passing of input file name possible"""


def pytest_addoption(parser):
parser.addoption("--inputfile", action="store", default="heeeeyyyoooo")
Loading

0 comments on commit 4c643dc

Please sign in to comment.