From 050b6aa1cce7b60aab500777c50872645cd95437 Mon Sep 17 00:00:00 2001 From: Eugeny Kalishenko Date: Sun, 29 Nov 2015 18:38:09 +0300 Subject: [PATCH] Test working directory set to the binary output directory in order to find copied test configuration files --- tests/CMakeLists.txt | 2 +- tests/test-hdr/CMakeLists.txt | 2 +- tests/unit/CMakeLists.txt | 2 +- tests/unit/map2/CMakeLists.txt | 2 +- tests/unit/pqueue/CMakeLists.txt | 2 +- tests/unit/queue/CMakeLists.txt | 2 +- tests/unit/set2/CMakeLists.txt | 2 +- tests/unit/stack/CMakeLists.txt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index edec3790..3de95852 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,5 +13,5 @@ add_library(${TEST_COMMON} OBJECT ${SOURCES}) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test-hdr) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unit) -file(GLOB CONF_FILES data/*.conf) +file(GLOB CONF_FILES ${PROJECT_SOURCE_DIR}/tests/data/*.conf) file(COPY ${CONF_FILES} DESTINATION ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file diff --git a/tests/test-hdr/CMakeLists.txt b/tests/test-hdr/CMakeLists.txt index c93157a1..7e41be48 100644 --- a/tests/test-hdr/CMakeLists.txt +++ b/tests/test-hdr/CMakeLists.txt @@ -414,4 +414,4 @@ set(CDS_TESTHDR_SOURCES add_executable(${PACKAGE_NAME} ${CDS_TESTHDR_SOURCES} $ $) target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME}) \ No newline at end of file +add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index ffd672dd..1d3063c7 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -12,7 +12,7 @@ set(CDSUNIT_MISC_SOURCES add_executable(${PACKAGE_NAME} ${CDSUNIT_MAP_SOURCES} $) target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME}) +add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/map2) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pqueue) diff --git a/tests/unit/map2/CMakeLists.txt b/tests/unit/map2/CMakeLists.txt index 0637900e..1a55ab84 100644 --- a/tests/unit/map2/CMakeLists.txt +++ b/tests/unit/map2/CMakeLists.txt @@ -100,4 +100,4 @@ set(CDSUNIT_MAP_SOURCES add_executable(${PACKAGE_NAME} ${CDSUNIT_MAP_SOURCES} $) target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME}) \ No newline at end of file +add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file diff --git a/tests/unit/pqueue/CMakeLists.txt b/tests/unit/pqueue/CMakeLists.txt index d89a966a..ae2a6d8b 100644 --- a/tests/unit/pqueue/CMakeLists.txt +++ b/tests/unit/pqueue/CMakeLists.txt @@ -7,4 +7,4 @@ set(CDSUNIT_PQUEUE_SOURCES add_executable(${PACKAGE_NAME} ${CDSUNIT_PQUEUE_SOURCES} $) target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME}) \ No newline at end of file +add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file diff --git a/tests/unit/queue/CMakeLists.txt b/tests/unit/queue/CMakeLists.txt index b32e7123..f41f29cf 100644 --- a/tests/unit/queue/CMakeLists.txt +++ b/tests/unit/queue/CMakeLists.txt @@ -10,4 +10,4 @@ set(CDSUNIT_QUEUE_SOURCES add_executable(${PACKAGE_NAME} ${CDSUNIT_QUEUE_SOURCES} $) target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME}) \ No newline at end of file +add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file diff --git a/tests/unit/set2/CMakeLists.txt b/tests/unit/set2/CMakeLists.txt index 89e71cf1..4431cdd3 100644 --- a/tests/unit/set2/CMakeLists.txt +++ b/tests/unit/set2/CMakeLists.txt @@ -38,4 +38,4 @@ set(CDSUNIT_SET_SOURCES add_executable(${PACKAGE_NAME} ${CDSUNIT_SET_SOURCES} $) target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME}) \ No newline at end of file +add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file diff --git a/tests/unit/stack/CMakeLists.txt b/tests/unit/stack/CMakeLists.txt index f521144c..ea341729 100644 --- a/tests/unit/stack/CMakeLists.txt +++ b/tests/unit/stack/CMakeLists.txt @@ -7,4 +7,4 @@ set(CDSUNIT_STACK_SOURCES add_executable(${PACKAGE_NAME} ${CDSUNIT_STACK_SOURCES} $) target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME}) \ No newline at end of file +add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file -- 2.34.1