From bfbce81df2f66d446cdb665d95bbdbacf2190f02 Mon Sep 17 00:00:00 2001 From: Peter J Slack Date: Tue, 29 Aug 2023 13:40:00 -0400 Subject: [PATCH] add copy of data to binary output folders so running all tests in rtneural_tests will pass --- tests/CMakeLists.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9e3eef20..21825a84 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -8,6 +8,30 @@ add_custom_command(TARGET rtneural_tests COMMAND ${CMAKE_COMMAND} -E echo "copying $ to ${PROJECT_BINARY_DIR}/rtneural_tests" COMMAND ${CMAKE_COMMAND} -E copy $ ${PROJECT_BINARY_DIR}/rtneural_tests) +#copy models for testing to build directory post build command +add_custom_command(TARGET rtneural_tests + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E echo "copying models to ${PROJECT_BINARY_DIR}/models" + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/../models ${PROJECT_BINARY_DIR}/models) + +#copy test_data folder to build directory post build command +add_custom_command(TARGET rtneural_tests + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E echo "copying test_data to ${PROJECT_BINARY_DIR}/test_data" + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/../test_data ${PROJECT_BINARY_DIR}/test_data) + +#copy models for testing to build directory for tests post build command +add_custom_command(TARGET rtneural_tests + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E echo "copying models to ${PROJECT_BINARY_DIR}/models" + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/../models ${PROJECT_BINARY_DIR}/tests/models) + +#copy test_data folder to build directory for tests post build command +add_custom_command(TARGET rtneural_tests + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E echo "copying test_data to ${PROJECT_BINARY_DIR}/test_data" + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/../test_data ${PROJECT_BINARY_DIR}/tests/test_data) + option(RTNEURAL_CODE_COVERAGE "Build RTNeural tests with code coverage flags" OFF) if(RTNEURAL_CODE_COVERAGE) include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/EnableCoverageFlags.cmake)