Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix dead stores.
[simgrid.git] / teshsuite / simdag / CMakeLists.txt
1 foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6 basic-parsing-test
2           comm-mxn-all2all comm-mxn-independent comm-mxn-scatter comm-p2p-latency-1
3           comm-p2p-latency-2 comm-p2p-latency-3 comm-p2p-latency-bound comp-only-par comp-only-seq incomplete)
4   add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.c)
5   target_link_libraries(${x}  simgrid)
6   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
7   add_dependencies(tests ${x})
8
9   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
10   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
11 endforeach()
12
13 foreach(x flatifier)
14   add_executable       (${x} EXCLUDE_FROM_ALL ${x}/${x}.cpp)
15   target_link_libraries(${x}  simgrid)
16   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
17   set_property(TARGET ${x} APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
18   add_dependencies(tests ${x})
19
20   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
21   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
22 endforeach()
23
24 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
25 set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_two_hosts_asymetric.tesh
26                                     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_missing_gateway.tesh
27                                     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_disk_attachment.tesh
28                                     ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-sym-full.tesh
29                                     ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-bypass.tesh
30                                     PARENT_SCOPE)
31 set(xml_files     ${xml_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/four_hosts_floyd.xml
32                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_multi_hop.xml
33                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/host_attributes.xml
34                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link_attributes.xml
35                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_multicore.xml
36                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_splitduplex.xml
37                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_router_id.xml
38                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster.xml
39                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_4p_1switch.xml
40                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/properties.xml
41                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/test_of_is_router.xml
42                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/three_hosts_non_symmetric_route.xml
43                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_clusters_one_name.xml
44                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_clusters_router_id.xml
45                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_clusters.xml
46                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_missing_src_gateway.xml
47                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_missing_dst_gateway.xml
48                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_two_hosts_asymetric.xml
49                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_one_link_splitduplex.xml
50                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_one_link.xml
51                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/Dijkstra.xml
52                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1bb.xml
53                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1fl.xml
54                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1sl.xml
55                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1sl_hetero.xml
56                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1switch.xml
57                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_disk_attachment.xml        PARENT_SCOPE)
58 set(txt_files     ${txt_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/carol.fail
59                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bob.trace
60                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/erin.avail
61                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.bw
62                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.fail
63                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.lat                         PARENT_SCOPE)
64
65 foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6 basic-parsing-test
66           comm-mxn-all2all comm-mxn-independent comm-mxn-scatter comm-p2p-latency-1 flatifier
67           comm-p2p-latency-2 comm-p2p-latency-3 comm-p2p-latency-bound comp-only-par comp-only-seq incomplete)
68   ADD_TESH(tesh-simdag-${x} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/${x} ${x}.tesh)
69 endforeach()
70
71 # test for code coverage
72 ADD_TEST(test-help-version ${TESH_WRAPPER_UNBOXED} ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test
73   --version --help --help-aliases --help-models --help-tracing)
74 ADD_TEST(test-help-logs    ${TESH_WRAPPER_UNBOXED} ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test
75   --help-logs --help-log-categories)
76
77 ADD_TESH(tesh-simdag-parser-bypass   --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic-parsing-test --setenv srcdir=${CMAKE_HOME_DIRECTORY} basic-parsing-test-bypass.tesh)
78 ADD_TESH(tesh-simdag-parser-sym-full --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic-parsing-test basic-parsing-test-sym-full.tesh)
79
80 ADD_TEST(tesh-simdag-full-links01    ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/two_clusters.xml FULL_LINK)
81 ADD_TEST(tesh-simdag-full-links02    ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/two_clusters_one_name.xml FULL_LINK)
82 ADD_TEST(tesh-simdag-one-link-g5k    ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/examples/platforms/g5k.xml ONE_LINK)
83
84 if(enable_debug)
85   # these tests need assertions
86   ADD_TESH(tesh-parser-bogus-symmetric         --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/flatifier --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh)
87   ADD_TESH(tesh-parser-bogus-missing-gw        --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/flatifier --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier/bogus_missing_gateway.tesh)
88   ADD_TESH(tesh-parser-bogus-disk-attachment   --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/flatifier --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier/bogus_disk_attachment.tesh)
89
90    #These tests fail on Windows as the signal returned is not the same as Unix would send.
91   if(WIN32)
92     set_property(TEST tesh-parser-bogus-symmetric PROPERTY WILL_FAIL TRUE)
93     set_property(TEST tesh-parser-bogus-missing-gw PROPERTY WILL_FAIL TRUE)
94     set_property(TEST tesh-parser-bogus-disk-attachment PROPERTY WILL_FAIL TRUE)
95   endif()
96 endif()