Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
eb9841950eb681661fc75a381a85c4f78751755d
[simgrid.git] / teshsuite / simdag / CMakeLists.txt
1 foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6 basic-link-test 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}  ${x}/${x}.c)
5   target_link_libraries(${x}  simgrid)
6   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
7
8   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
9   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
10 endforeach()
11
12 foreach(x evaluate-parse-time evaluate-get-route-time)
13   add_executable       (${x} ${x}/${x}.c)
14   target_link_libraries(${x} simgrid)
15   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
16
17   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
18 endforeach()
19
20 foreach(x flatifier is-router)
21   add_executable       (${x}  ${x}/${x}.cpp)
22   target_link_libraries(${x}  simgrid)
23   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
24   set_property(TARGET ${x} APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
25
26   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
27   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
28 endforeach()
29
30 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
31 set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_two_hosts_asymetric.tesh
32                                     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_missing_gateway.tesh
33                                     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_disk_attachment.tesh
34                                     ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-sym-full.tesh
35                                     ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-bypass.tesh
36                                     PARENT_SCOPE)
37 set(xml_files     ${xml_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/four_hosts_floyd.xml
38                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_multi_hop.xml
39                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/host_attributes.xml
40                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link_attributes.xml
41                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_multicore.xml
42                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_splitduplex.xml
43                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_router_id.xml
44                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster.xml
45                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_4p_1switch.xml
46                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/properties.xml
47                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/test_of_is_router.xml
48                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/three_hosts_non_symmetric_route.xml
49                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_clusters_one_name.xml
50                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_clusters_router_id.xml
51                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_clusters.xml
52                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_missing_src_gateway.xml
53                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_missing_dst_gateway.xml
54                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_two_hosts_asymetric.xml
55                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_one_link_splitduplex.xml
56                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_one_link.xml
57                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/Dijkstra.xml
58                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1bb.xml
59                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1fl.xml
60                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1sl.xml
61                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1sl_hetero.xml
62                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1switch.xml
63                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_disk_attachment.xml        PARENT_SCOPE)
64 set(txt_files     ${txt_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/carol.fail
65                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bob.trace
66                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/erin.avail
67                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.bw
68                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.fail
69                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.lat                         PARENT_SCOPE)
70
71 foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6 basic-link-test basic-parsing-test
72           comm-mxn-all2all comm-mxn-independent comm-mxn-scatter comm-p2p-latency-1 flatifier is-router
73           comm-p2p-latency-2 comm-p2p-latency-3 comm-p2p-latency-bound comp-only-par comp-only-seq incomplete)
74   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)
75 endforeach()
76
77 # test for code coverage
78 ADD_TEST(test-help            ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test --help)
79 ADD_TEST(test-help-models     ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test --help-models)
80 ADD_TEST(test-tracing-help    ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test --help-tracing)
81
82 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)
83 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)
84
85 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)
86 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)
87 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)
88
89 if(enable_debug AND NOT enable_memcheck)
90   # these tests need assertions. Exclude them from memcheck, as they normally die, leaving lots of unfree'd objects
91   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)
92   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)
93   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)
94
95    #These tests fail on Windows as the signal returned is not the same as Unix would send.
96   if(WIN32)
97     set_property(TEST tesh-parser-bogus-symmetric PROPERTY WILL_FAIL TRUE)
98     set_property(TEST tesh-parser-bogus-missing-gw PROPERTY WILL_FAIL TRUE)
99     set_property(TEST tesh-parser-bogus-disk-attachment PROPERTY WILL_FAIL TRUE)
100   endif()
101 endif()