Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
activate a test to improve coverage a bit
[simgrid.git] / teshsuite / smpi / mpich3-test / pt2pt / CMakeLists.txt
1 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
2   if(WIN32)
3     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
4   else()
5     set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
6     set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
7   endif()
8
9   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
10   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
11
12   foreach(file anyall bottom eagerdt huge_anysrc huge_underflow inactivereq isendself isendirecv isendselfprobe issendselfcancel cancelanysrc pingping probenull
13           dtype_send greq1 probe-unexp rqstatus sendall sendflood sendrecv1 sendrecv2 sendrecv3 waitany-null waittestnull many_isend manylmt recv_any scancel scancel2 rcancel)
14     # not compiled files: big_count_status bsend1 bsend2 bsend3 bsend4 bsend5 bsendalign bsendfrag bsendpending mprobe
15     # cancelrecv  icsend large_message pscancel  rqfreeb   sendself scancel_unmatch
16     add_executable(${file} EXCLUDE_FROM_ALL ${file}.c)
17     add_dependencies(tests ${file})
18     target_link_libraries(${file} simgrid mtest_c)
19   endforeach()
20
21   if(HAVE_RAW_CONTEXTS AND (NOT enable_memcheck) AND (NOT enable_address_sanitizer) AND (NOT enable_undefined_sanitizer) AND (NOT enable_thread_sanitizer))
22     set(facto "--cfg=contexts/factory:raw")
23     set(name raw)
24   else()
25     set(facto "--cfg=contexts/factory:thread")
26     set(name thread)
27   endif()
28   ADD_TEST(test-smpi-mpich3-pt2pt-${name}      ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/pt2pt ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests "-wrapper=${TESH_WRAPPER}" -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/pt2pt -tests=testlist -execarg=${facto} )
29   SET_TESTS_PROPERTIES(test-smpi-mpich3-pt2pt-${name} PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
30   unset(facto)
31   unset(name)
32 endif()
33
34 foreach(file anyall bottom eagerdt huge_anysrc huge_underflow inactivereq isendself isendirecv isendselfprobe issendselfcancel pingping probenull
35           probe-unexp sendall sendflood sendrecv1 sendrecv2 sendrecv3 waitany-null waittestnull
36           big_count_status bsend1 bsend2 bsend3 bsend4 bsend5 bsendalign bsendfrag bsendpending
37           cancelrecv cancelanysrc dtype_send greq1 icsend large_message pscancel rcancel rqfreeb rqstatus scancel2 scancel sendself many_isend manylmt mprobe recv_any scancel_unmatch
38 )
39   set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c)
40 endforeach()
41
42 set(examples_src  ${examples_src}                                        PARENT_SCOPE)
43 set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/testlist  PARENT_SCOPE)