Skip to content

Commit

Permalink
add copy of data to binary output folders so running all tests in rtn…
Browse files Browse the repository at this point in the history
…eural_tests will pass
  • Loading branch information
pslack committed Aug 29, 2023
1 parent 0d0adf9 commit bfbce81
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@ add_custom_command(TARGET rtneural_tests
COMMAND ${CMAKE_COMMAND} -E echo "copying $<TARGET_FILE:rtneural_tests> to ${PROJECT_BINARY_DIR}/rtneural_tests"
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:rtneural_tests> ${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)
Expand Down

0 comments on commit bfbce81

Please sign in to comment.