Skip to content
Snippets Groups Projects
Commit b313a6b4 authored by Wouter Klijn's avatar Wouter Klijn
Browse files

Move test types to specific test directories.

Gtest is currently copy twice!
parent 74a86464
No related branches found
No related tags found
No related merge requests found
Showing
with 31659 additions and 66 deletions
set(HEADERS
../src/cell.hpp
../src/cell_tree.hpp
../src/math.hpp
../src/point.hpp
../src/segment.hpp
../src/swcio.hpp
../src/tree.hpp
)
# Large test, employing the full simulator.
# validated using deltas on output data
#add_subdirectory(delta)
# google test framework
add_library(gtest gtest-all.cpp gtest.h)
set(TEST_SOURCES
# unit tests
test_algorithms.cpp
test_cell.cpp
test_compartments.cpp
test_event_queue.cpp
test_fvm.cpp
test_cell_group.cpp
test_matrix.cpp
test_mechanisms.cpp
test_optional.cpp
test_parameters.cpp
test_point.cpp
test_probe.cpp
test_segment.cpp
test_spikes.cpp
test_stimulus.cpp
test_swcio.cpp
test_synapses.cpp
test_tree.cpp
test_uninitialized.cpp
# unit test driver
test.cpp
)
set(VALIDATION_SOURCES
# unit tests
validate_ball_and_stick.cpp
validate_soma.cpp
#validate_synapses.cpp
# Test for the internode communication (eg. mpi)
#add_subdirectory(global_communication)
# unit test driver
validate.cpp
)
# Test to check integration between components of the site_name
#add_subdirectory(integration)
add_definitions("-DDATADIR=\"${CMAKE_SOURCE_DIR}/data\"")
add_executable(test.exe ${TEST_SOURCES} ${HEADERS})
add_executable(validate.exe ${VALIDATION_SOURCES} ${HEADERS})
# Check for performance: This could include stand alone tests
# These do not necessarily be run automatically
#add_subdirectory(performance)
set(TARGETS test.exe validate.exe)
# Numbered tests based on bugs in the tracker
#add_subdirectory(regression)
foreach(target ${TARGETS})
target_link_libraries(${target} LINK_PUBLIC cellalgo gtest)
if(WITH_TBB)
target_link_libraries(${target} LINK_PUBLIC ${TBB_LIBRARIES})
endif()
if(WITH_MPI)
target_link_libraries(${target} LINK_PUBLIC ${MPI_C_LIBRARIES})
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS "${MPI_C_LINK_FLAGS}")
endif()
# google test framework
# This fails with lots of undefined reference to `testing::UnitTest::Run()'
#add_library(GTEST gtest-all.cpp gtest.h)
set_target_properties(${target}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
)
endforeach()
# Unit tests
add_subdirectory(unit)
# Test validating models, possebly needing other software installed
add_subdirectory(validation)
\ No newline at end of file
set(HEADERS
${PROJECT_SOURCE_DIR}/src/cell.hpp
${PROJECT_SOURCE_DIR}/src/cell_tree.hpp
${PROJECT_SOURCE_DIR}/src/math.hpp
${PROJECT_SOURCE_DIR}/src/point.hpp
${PROJECT_SOURCE_DIR}/src/segment.hpp
${PROJECT_SOURCE_DIR}/src/swcio.hpp
${PROJECT_SOURCE_DIR}/src/tree.hpp
)
# google test framework
add_library(gtest gtest-all.cpp gtest.h)
set(TEST_SOURCES
# unit tests
test_algorithms.cpp
#test_cell.cpp
test_compartments.cpp
test_event_queue.cpp
test_fvm.cpp
test_cell_group.cpp
test_matrix.cpp
test_mechanisms.cpp
test_optional.cpp
test_parameters.cpp
test_point.cpp
test_probe.cpp
test_segment.cpp
test_spikes.cpp
test_stimulus.cpp
test_swcio.cpp
test_synapses.cpp
#test_tree.cpp
test_uninitialized.cpp
# unit test driver
test.cpp
)
add_definitions("-DDATADIR=\"${CMAKE_SOURCE_DIR}/data\"")
add_executable(test.exe ${TEST_SOURCES} ${HEADERS})
set(TARGETS test.exe)
foreach(target ${TARGETS})
target_link_libraries(${target} LINK_PUBLIC cellalgo gtest)
if(WITH_TBB)
target_link_libraries(${target} LINK_PUBLIC ${TBB_LIBRARIES})
endif()
if(WITH_MPI)
target_link_libraries(${target} LINK_PUBLIC ${MPI_C_LIBRARIES})
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS "${MPI_C_LINK_FLAGS}")
endif()
set_target_properties(${target}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
)
endforeach()
This diff is collapsed.
This diff is collapsed.
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment