Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disable stack-overflow test with threads.
[simgrid.git] / teshsuite / simix / CMakeLists.txt
1 foreach(x check-defaults generic-simcalls stack-overflow)
2   add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.cpp)
3   target_link_libraries(${x}  simgrid)
4   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
5   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
6   add_dependencies(tests ${x})
7 endforeach()
8
9 foreach (factory raw thread boost ucontext)
10   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/check-defaults/factory_${factory}.tesh)
11 endforeach()
12
13 set(teshsuite_src  ${teshsuite_src}                                                                        PARENT_SCOPE)
14 set(tesh_files     ${tesh_files}     
15     ${CMAKE_CURRENT_SOURCE_DIR}/stack-overflow/stack-overflow.tesh  
16     ${CMAKE_CURRENT_SOURCE_DIR}/generic-simcalls/generic-simcalls.tesh    
17     PARENT_SCOPE)
18
19 IF(HAVE_RAW_CONTEXTS)
20   ADD_TESH(tesh-simix-factory-default --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_raw.tesh)
21 ELSEIF(HAVE_UCONTEXT_CONTEXTS)
22   ADD_TESH(tesh-simix-factory-default --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_ucontext.tesh)
23 ELSEIF(HAVE_BOOST_CONTEXTS)
24   ADD_TESH(tesh-simix-factory-default --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_boost.tesh)
25 ELSE()
26   ADD_TESH(tesh-simix-factory-default --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_thread.tesh)
27 ENDIF()
28
29 if (NOT enable_memcheck AND NOT enable_address_sanitizer)
30   ADD_TESH_FACTORIES(stack-overflow   "ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/stack-overflow --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/stack-overflow stack-overflow.tesh)
31 endif()
32 if (NOT enable_memcheck)
33   ADD_TESH_FACTORIES(generic-simcalls "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/generic-simcalls --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/generic-simcalls generic-simcalls.tesh)
34 endif()
35
36 foreach (factory raw thread boost ucontext)
37   string (TOUPPER have_${factory}_contexts VARNAME)
38   if (${factory} STREQUAL "thread" OR ${VARNAME})
39     if (release AND (WIN32 OR CMAKE_SYSTEM_NAME MATCHES "Darwin"))
40       SET_TESTS_PROPERTIES(stack-overflow-${factory} PROPERTIES WILL_FAIL true)
41     endif()
42     ADD_TESH(tesh-simix-factory-${factory} --cfg contexts/factory:${factory} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_${factory}.tesh)
43   endif()
44 endforeach()