Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enable CTest on Windows builds#533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
giacomofiorin wants to merge9 commits intomaster
base:master
Choose a base branch
Loading
fromctest-windows
Draft
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Enable tests outside Linux
  • Loading branch information
@giacomofiorin
giacomofiorin committedSep 10, 2023
commitc15172922e0f741a22f4965bf6bb0970488e1308
68 changes: 33 additions & 35 deletionscmake/buildColvarsTests.cmake
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,42 +3,40 @@ if(BUILD_TESTS)
# Build functional tests' executables
add_subdirectory(${COLVARS_SOURCE_DIR}/tests/functional tests/functional)

if(DEFINED CMAKE_SYSTEM_NAME)
# # TODO automate this step and make it OS-portable
# if(DEFINED CMAKE_SYSTEM_NAME)
# if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# add_custom_command(TARGET colvars POST_BUILD
# COMMAND bash build_tests.sh
# ${CMAKE_BINARY_DIR}/tests/functional
# WORKING_DIRECTORY ${COLVARS_SOURCE_DIR}/tests)
# endif()
# endif()

# Copy the Colvars configuration files
file(GLOB TEST_CONFIG_FILES ${COLVARS_SOURCE_DIR}/tests/input_files/*/test.in)
foreach(TEST_CONFIG_FILE ${TEST_CONFIG_FILES})
get_filename_component(TEST_NAME ${TEST_CONFIG_FILE} DIRECTORY)
get_filename_component(TEST_NAME ${TEST_NAME} NAME)
add_custom_command(TARGET colvars POST_BUILD
COMMAND ${CMAKE_COMMAND}
-E copy ${TEST_CONFIG_FILE}
${CMAKE_BINARY_DIR}/tests/functional/${TEST_NAME}/test.in)
add_test(NAME ${TEST_NAME}
COMMAND run_colvars_test ${TEST_NAME}/test.in
WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/tests/functional)
endforeach()

# Copy other input files (coordinates, index files, etc)
file(GLOB TEST_INPUT_FILES ${COLVARS_SOURCE_DIR}/tests/input_files/*)
foreach(TEST_INPUT_FILE ${TEST_INPUT_FILES})
add_custom_command(TARGET colvars POST_BUILD
COMMAND ${CMAKE_COMMAND}
-E copy ${TEST_INPUT_FILE}
${CMAKE_BINARY_DIR}/tests/functional)
endforeach(TEST_INPUT_FILE)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")

# TODO automate this step and make it OS-portable
# add_custom_command(TARGET colvars POST_BUILD
# COMMAND bash build_tests.sh
# ${CMAKE_BINARY_DIR}/tests/functional
# WORKING_DIRECTORY ${COLVARS_SOURCE_DIR}/tests)

# Copy the Colvars configuration files
file(GLOB TEST_CONFIG_FILES ${COLVARS_SOURCE_DIR}/tests/input_files/*/test.in)
foreach(TEST_CONFIG_FILE ${TEST_CONFIG_FILES})
get_filename_component(TEST_NAME ${TEST_CONFIG_FILE} DIRECTORY)
get_filename_component(TEST_NAME ${TEST_NAME} NAME)
add_custom_command(TARGET colvars POST_BUILD
COMMAND ${CMAKE_COMMAND}
-E copy ${TEST_CONFIG_FILE}
${CMAKE_BINARY_DIR}/tests/functional/${TEST_NAME}/test.in)
add_test(NAME ${TEST_NAME}
COMMAND run_colvars_test ${TEST_NAME}/test.in
WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/tests/functional)
endforeach()

# Copy other input files (coordinates, index files, etc)
file(GLOB TEST_INPUT_FILES ${COLVARS_SOURCE_DIR}/tests/input_files/*)
foreach(TEST_INPUT_FILE ${TEST_INPUT_FILES})
add_custom_command(TARGET colvars POST_BUILD
COMMAND ${CMAKE_COMMAND}
-E copy ${TEST_INPUT_FILE}
${CMAKE_BINARY_DIR}/tests/functional)
endforeach(TEST_INPUT_FILE)

endif()
endif()
enable_testing()
endif()

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp