Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the cmake ExternalData to download the test data #33

Merged
merged 4 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,20 @@ target_include_directories(edm4hep_roundtrip PRIVATE

add_test(NAME edm4hep_roundtrip COMMAND edm4hep_roundtrip)

find_program(BASH_PROGRAM bash)
include(ExternalData)
list(APPEND ExternalData_URL_TEMPLATES
"https://key4hep.web.cern.ch:443/testFiles/k4EDM4hep2LcioConv/%(hash)"
)

add_test(fetch_test_inputs ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/get_test_data.sh)
ExternalData_Add_Test(converter_tests NAME standalone_ild_rec_file COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/run_standalone_converter.sh DATA{${PROJECT_SOURCE_DIR}/tests/input_files/ild_higgs_rec.slcio})

add_test(standalone_ild_rec_file ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/run_standalone_converter.sh ild_higgs_rec.slcio)

add_test(standalone_ild_dst_file ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/run_standalone_converter.sh ild_higgs_dst.slcio)
ExternalData_Add_Test(converter_tests NAME standalone_ild_dst_file COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/run_standalone_converter.sh DATA{${PROJECT_SOURCE_DIR}/tests/input_files/ild_higgs_dst.slcio})

set_tests_properties(
fetch_test_inputs
standalone_ild_rec_file
standalone_ild_dst_file
PROPERTIES
ENVIRONMENT "TEST_DIR=${CMAKE_CURRENT_SOURCE_DIR};PATH=${CMAKE_CURRENT_BINARY_DIR}:${PROJECT_BINARY_DIR}/standalone:$ENV{PATH}"
)

set_tests_properties(
standalone_ild_rec_file
standalone_ild_dst_file
PROPERTIES
DEPENDS fetch_test_inputs
)
ExternalData_Add_Target(converter_tests)
1 change: 1 addition & 0 deletions tests/input_files/ild_higgs_dst.slcio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
43c6052ce40d73cab583682e53f1218e
1 change: 1 addition & 0 deletions tests/input_files/ild_higgs_rec.slcio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6f402a67c7c1f4ef62650651426bdf08
15 changes: 0 additions & 15 deletions tests/scripts/get_test_data.sh

This file was deleted.

Empty file modified tests/scripts/run_standalone_converter.sh
100644 → 100755
Empty file.
Loading