tests data bug fix - too many copies of tests/data

This commit is contained in:
Marko Budiselic 2016-12-18 10:16:07 +01:00
parent 715e4b302b
commit 948694fd27
3 changed files with 14 additions and 17 deletions

View File

@ -40,19 +40,6 @@ set(cxx_standard 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
# -----------------------------------------------------------------------------
# custom targets
# move test data data to the build directory
if (UNIX)
set(test_data "tests/data")
set(test_data_src "${CMAKE_SOURCE_DIR}/${test_data}")
set(test_data_dst "${CMAKE_BINARY_DIR}/${test_data}")
add_custom_target (test_data
COMMAND rm -rf ${test_data_dst}
COMMAND cp -r ${test_data_src} ${test_data_dst}
)
endif (UNIX)
# -----------------------------------------------------------------------------
# dir variables
set(src_dir ${CMAKE_SOURCE_DIR}/src)
set(libs_dir ${CMAKE_SOURCE_DIR}/libs)

View File

@ -6,11 +6,21 @@ enable_testing()
include_directories(${catch_source_dir}/include)
# copy unit test data
# copy test data
file(COPY ${CMAKE_SOURCE_DIR}/tests/data
DESTINATION ${CMAKE_BINARY_DIR}/tests)
file(COPY ${CMAKE_SOURCE_DIR}/tests/data
DESTINATION ${CMAKE_BINARY_DIR}/tests/unit)
# move test data data to the build directory
if (UNIX)
set(test_data "tests/data")
set(test_data_src "${CMAKE_SOURCE_DIR}/${test_data}")
set(test_data_dst "${CMAKE_BINARY_DIR}/${test_data}")
add_custom_target (test_data
COMMAND rm -rf ${test_data_dst}
COMMAND cp -r ${test_data_src} ${test_data_dst}
)
endif (UNIX)
# -----------------------------------------------------------------------------
# benchmark test binaries
if (ALL_TESTS OR BENCHMARK_TESTS)

View File

@ -19,7 +19,7 @@ auto load_queries()
{
std::vector<std::string> queries;
fs::path queries_path = "data/queries/cypher";
fs::path queries_path = "../data/queries/cypher";
std::string query_file_extension = "cypher";
for (auto& directory_entry :