add working directory to test

This commit is contained in:
ToruNiina
2017-05-12 20:50:04 +09:00
parent 1c26ffe3ae
commit 96429e3e08

View File

@@ -9,6 +9,7 @@ set(TEST_NAMES
test_datetime
test_acceptor
test_parser
test_parse_file
)
add_definitions("-Wall -Wpedantic")
@@ -24,5 +25,5 @@ endif()
foreach(TEST_NAME ${TEST_NAMES})
add_executable(${TEST_NAME} ${TEST_NAME}.cpp)
target_link_libraries(${TEST_NAME} ${test_library_dependencies})
add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/build)
endforeach(TEST_NAME)