From 9ad574a4712b08ee11c8f832f93214640b01280c Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Mon, 6 Nov 2023 14:50:03 +0100 Subject: [PATCH] Fix legacy tests (#510) --- tests/root_io/CMakeLists.txt | 3 +-- tests/root_io/read_frame_root.cpp | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/root_io/CMakeLists.txt b/tests/root_io/CMakeLists.txt index 598046e3a..e719e583f 100644 --- a/tests/root_io/CMakeLists.txt +++ b/tests/root_io/CMakeLists.txt @@ -59,8 +59,7 @@ target_link_libraries(read-legacy-files-root PRIVATE TestDataModel TestDataModel macro(ADD_PODIO_LEGACY_TEST version base_test input_file) ExternalData_Add_Test(legacy_test_cases NAME ${base_test}_${version} - COMMAND ${base_test} ${CMAKE_CURRENT_BINARY_DIR}/../input_files/${input_file} - DATA{${PROJECT_SOURCE_DIR}/tests/input_files/${input_file}} + COMMAND ${base_test} DATA{${PROJECT_SOURCE_DIR}/tests/input_files/${input_file}} ) set_property(TEST ${base_test}_${version} PROPERTY ENVIRONMENT LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/tests:${PROJECT_BINARY_DIR}/src:$ENV{LD_LIBRARY_PATH} diff --git a/tests/root_io/read_frame_root.cpp b/tests/root_io/read_frame_root.cpp index b687fa83e..2e7f466de 100644 --- a/tests/root_io/read_frame_root.cpp +++ b/tests/root_io/read_frame_root.cpp @@ -12,6 +12,10 @@ int main(int argc, char* argv[]) { if (argc == 2) { inputFile = argv[1]; assertBuildVersion = false; + } else if (argc > 2) { + std::cout << "Wrong number of arguments" << std::endl; + std::cout << "Usage: " << argv[0] << " FILE" << std::endl; + return 1; } return read_frames(inputFile, assertBuildVersion) +