|
|
@ -9,15 +9,32 @@ register_source_groups_from_filestructure("${ALL_FILES}" test) |
|
|
|
# Note that the tests also need the source files, except for the main file |
|
|
|
include_directories(${GTEST_INCLUDE_DIR}) |
|
|
|
|
|
|
|
foreach (testsuite abstraction adapter builder logic modelchecker parser permissiveschedulers solver storage transformer utility) |
|
|
|
|
|
|
|
file(GLOB_RECURSE TEST_${testsuite}_FILES ${STORM_TESTS_BASE_PATH}/${testsuite}/*.h ${STORM_TESTS_BASE_PATH}/${testsuite}/*.cpp) |
|
|
|
add_executable (test-${testsuite} ${TEST_${testsuite}_FILES} ${STORM_TESTS_BASE_PATH}/storm-test.cpp) |
|
|
|
target_link_libraries(test-${testsuite} storm storm-parsers storm-conv) |
|
|
|
target_link_libraries(test-${testsuite} ${STORM_TEST_LINK_LIBRARIES}) |
|
|
|
|
|
|
|
add_dependencies(test-${testsuite} test-resources) |
|
|
|
add_test(NAME run-test-${testsuite} COMMAND $<TARGET_FILE:test-${testsuite}>) |
|
|
|
add_dependencies(tests test-${testsuite}) |
|
|
|
|
|
|
|
endforeach () |
|
|
|
# Set split and non-split test directories |
|
|
|
set(NON_SPLIT_TESTS abstraction adapter builder logic parser permissiveschedulers solver storage transformer utility) |
|
|
|
set(MODELCHECKER_TEST_SPLITS abstraction csl exploration multiobjective prctl reachability) |
|
|
|
|
|
|
|
function(configure_testsuite_target testsuite) |
|
|
|
#message(CONFIGURING TESTSUITE '${testsuite}') #DEBUG |
|
|
|
target_link_libraries(test-${testsuite} storm storm-parsers storm-conv) |
|
|
|
target_link_libraries(test-${testsuite} ${STORM_TEST_LINK_LIBRARIES}) |
|
|
|
|
|
|
|
add_dependencies(test-${testsuite} test-resources) |
|
|
|
add_test(NAME run-test-${testsuite} COMMAND $<TARGET_FILE:test-${testsuite}>) |
|
|
|
add_dependencies(tests test-${testsuite}) |
|
|
|
endfunction() |
|
|
|
|
|
|
|
foreach(testsuite ${NON_SPLIT_TESTS}) |
|
|
|
file(GLOB_RECURSE TEST_${testsuite}_FILES ${STORM_TESTS_BASE_PATH}/${testsuite}/*.h ${STORM_TESTS_BASE_PATH}/${testsuite}/*.cpp) |
|
|
|
add_executable(test-${testsuite} ${TEST_${testsuite}_FILES} ${STORM_TESTS_BASE_PATH}/storm-test.cpp) |
|
|
|
configure_testsuite_target(${testsuite}) |
|
|
|
endforeach() |
|
|
|
|
|
|
|
# Modelchecker testsuite split |
|
|
|
foreach(modelchecker_split ${MODELCHECKER_TEST_SPLITS}) |
|
|
|
file(GLOB_RECURSE TEST_MODELCHECKER_${modelchecker_split}_FILES ${STORM_TESTS_BASE_PATH}/modelchecker/${modelchecker_split}/*.h ${STORM_TESTS_BASE_PATH}/modelchecker/${modelchecker_split}/*.cpp) |
|
|
|
foreach(tmp ${TEST_MODELCHECKER_${modelchecker_split}_FILES}) |
|
|
|
message(${tmp}) |
|
|
|
endforeach() |
|
|
|
add_executable(test-modelchecker-${modelchecker_split} ${TEST_MODELCHECKER_${modelchecker_split}_FILES} ${STORM_TESTS_BASE_PATH}/storm-test.cpp) |
|
|
|
configure_testsuite_target(modelchecker-${modelchecker_split}) |
|
|
|
endforeach() |