Skip to content

Commit

Permalink
Rename tests to make it easier to define dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 10, 2024
1 parent bec3a96 commit 9167bc0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
10 changes: 5 additions & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ function(set_test_env _testname)
)
endfunction()

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

add_test(NAME "Create an EDM4hep data file (RNTuple)" COMMAND python ${PROJECT_SOURCE_DIR}/scripts/createEDM4hepFile.py --rntuple --output-file edm4hep_example_rntuple.root)
set_test_env("Create an EDM4hep data file (RNTuple)")
set_tests_properties("Create an EDM4hep data file (RNTuple)" PROPERTIES
add_test(NAME create_complete_file_rntuple COMMAND python ${PROJECT_SOURCE_DIR}/scripts/createEDM4hepFile.py --rntuple --output-file edm4hep_example_rntuple.root)
set_test_env(create_complete_file_rntuple)
set_tests_properties(create_complete_file_rntuple PROPERTIES
SKIP_REGULAR_EXPRESSION "The RNTuple writer from podio is not available but was requested"
)

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

add_test(NAME check_complete_file_rntuple COMMAND pytest --inputfile=${CMAKE_BINARY_DIR}/test/edm4hep_example_rntuple.root -v)

set_test_env(check_complete_file)
set_test_env(check_complete_file_rntuple)

set_tests_properties(
check_complete_file

PROPERTIES
DEPENDS "Create an EDM4hep data file"
DEPENDS create_complete_file
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_test(NAME check_complete_file_rntuple COMMAND pytest --inputfile=${CMAKE_BINARY_DIR}/test/edm4hep_example_rntuple.root -v)
set_test_env(check_complete_file_rntuple)
set_tests_properties(
check_complete_file_rntuple

PROPERTIES
DEPENDS "Create an EDM4hep data file (RNtuple)"
DEPENDS create_complete_file_rntuple
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

0 comments on commit 9167bc0

Please sign in to comment.