From 4c7503d2e923dfbe0e124077387ff150edf3fe46 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Thu, 7 Nov 2024 18:48:21 +0100 Subject: [PATCH] Make sure to only run tests with compatible root versions --- test/backwards_compat/CMakeLists.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/test/backwards_compat/CMakeLists.txt b/test/backwards_compat/CMakeLists.txt index bb1b6cb59..a822cd0b0 100644 --- a/test/backwards_compat/CMakeLists.txt +++ b/test/backwards_compat/CMakeLists.txt @@ -2,14 +2,26 @@ ExternalData_Add_Test(backward_compat_tests NAME backwards_compat_v00-99 COMMAND pytest -v --inputfile=DATA{${CMAKE_CURRENT_SOURCE_DIR}/input_files/edm4hep_example_v00-99-01_podio_v01-01.root}) set_test_env(backwards_compat_v00-99) -ExternalData_Add_Test(backward_compat_tests - NAME backwards_compat_rntuple_v00-99 COMMAND pytest -v --inputfile=DATA{${CMAKE_CURRENT_SOURCE_DIR}/input_files/edm4hep_example_rntuple_v00-99-01_podio_v01-01.root}) -set_test_env(backwards_compat_rntuple_v00-99) - set_tests_properties( backwards_compat_v00-99 - backwards_compat_rntuple_v00-99 PROPERTIES WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test ) + + +if (ROOT_VERSION VERSION_LESS 6.33) + # This input file has been written with RNTuple RC2 which is only present up + # to the 6.32 release series. Trying to read this with a newer version of ROOT + # doesn't work + ExternalData_Add_Test(backward_compat_tests + NAME backwards_compat_rntuple_v00-99 COMMAND pytest -v --inputfile=DATA{${CMAKE_CURRENT_SOURCE_DIR}/input_files/edm4hep_example_rntuple_v00-99-01_podio_v01-01.root}) + set_test_env(backwards_compat_rntuple_v00-99) + + set_tests_properties( + backwards_compat_rntuple_v00-99 + + PROPERTIES + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test + ) +endif()