diff --git a/CMakeLists.txt b/CMakeLists.txt index f9af1f2cf..85a5c5bbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,9 +65,9 @@ find_package(nlohmann_json 3.10.5) add_subdirectory(edm4hep) add_subdirectory(utils) -add_subdirectory(test) add_subdirectory(tools) add_subdirectory(python) +add_subdirectory(test) #--- create uninstall target --------------------------------------------------- include(cmake/EDM4HEPUninstall.cmake) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f83a6f544..4f36494bc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -96,4 +96,12 @@ endif() add_subdirectory(utils) add_subdirectory(tools) +include(ExternalData) +list(APPEND ExternalData_URL_TEMPLATES + "https://key4hep.web.cern.ch:443/testFiles/EDM4hep/%(hash)" +) + add_subdirectory(backwards_compat) + +ExternalData_Add_Target(backward_compat_tests) +message(STATUS "Test inputs for backwards compatibility tests are (will be) stored in " ${ExternalData_OBJECT_STORES}) diff --git a/test/backwards_compat/CMakeLists.txt b/test/backwards_compat/CMakeLists.txt index a03b88ef3..8d82a3986 100644 --- a/test/backwards_compat/CMakeLists.txt +++ b/test/backwards_compat/CMakeLists.txt @@ -1,19 +1,28 @@ 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_complete_file - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +set_tests_properties(check_complete_file PROPERTIES DEPENDS create_complete_file ) 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_complete_file_rntuple +) + +ExternalData_Add_Test(backward_compat_tests + NAME backwards_compat_v00-99 COMMAND pytest --inputfile=DATA{${CMAKE_CURRENT_SOURCE_DIR}/input_files/edm4hep_example_v00-99_podio_v01-00-01.root}) +set_test_env(backwards_compat_v00-99) + +ExternalData_Add_Test(backward_compat_tests + NAME backwards_compat_rntuple_v00-99 COMMAND pytest --inputfile=DATA{${CMAKE_CURRENT_SOURCE_DIR}/input_files/edm4hep_example_rntuple_v00-99_podio_v01-00-01.root}) +set_test_env(backwards_compat_rntuple_v00-99) + set_tests_properties( + check_complete_file check_complete_file_rntuple + backwards_compat_v00-99 + backwards_compat_rntuple_v00-99 PROPERTIES - DEPENDS create_complete_file_rntuple - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/test/backwards_compat/input_files/edm4hep_example_rntuple_v00-99_podio_v01-00-01.root.md5 b/test/backwards_compat/input_files/edm4hep_example_rntuple_v00-99_podio_v01-00-01.root.md5 new file mode 100644 index 000000000..053830daa --- /dev/null +++ b/test/backwards_compat/input_files/edm4hep_example_rntuple_v00-99_podio_v01-00-01.root.md5 @@ -0,0 +1 @@ +6f3e8c366c7014c2220acd94e2cd4558 diff --git a/test/backwards_compat/input_files/edm4hep_example_v00-99_podio_v01-00-01.root.md5 b/test/backwards_compat/input_files/edm4hep_example_v00-99_podio_v01-00-01.root.md5 new file mode 100644 index 000000000..58b17ba0e --- /dev/null +++ b/test/backwards_compat/input_files/edm4hep_example_v00-99_podio_v01-00-01.root.md5 @@ -0,0 +1 @@ +215f4db666f696e5f9ad010cc1001b05