Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge if statements.
[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
25   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
26   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
27 endforeach()
28
29 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
30 set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_two_hosts_asymetric.tesh
31                                     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_missing_gateway.tesh
32                                     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_disk_attachment.tesh
33                                     ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-sym-full.tesh
34                                     ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-bypass.tesh
35                                     PARENT_SCOPE)
36 set(xml_files     ${xml_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/four_hosts_floyd.xml
37                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_multi_hop.xml
38                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/host_attributes.xml
39                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link_attributes.xml
40                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_multicore.xml
41                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_fullduplex.xml
42                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_router_id.xml
43                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster.xml
44                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_4p_1switch.xml
45                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_include.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_fullduplex.xml
56                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_one_link.xml
57                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/clusterA.xml
58                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/clusterB.xml
59                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/Dijkstra.xml
60                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1bb.xml
61                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1fl.xml
62                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1sl.xml
63                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1sl_hetero.xml
64                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/platform_2p_1switch.xml
65                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_disk_attachment.xml        PARENT_SCOPE)
66 set(txt_files     ${txt_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/carol.fail
67                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bob.trace
68                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/erin.avail
69                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.bw
70                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.fail
71                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.lat                         PARENT_SCOPE)
72
73 foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6 basic-link-test basic-parsing-test
74           comm-mxn-all2all comm-mxn-independent comm-mxn-scatter comm-p2p-latency-1 flatifier is-router
75           comm-p2p-latency-2 comm-p2p-latency-3 comm-p2p-latency-bound comp-only-par comp-only-seq incomplete)
76   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)
77 endforeach()
78
79 # test for code coverage
80 ADD_TEST(test-help            ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test --help)
81 ADD_TEST(test-help-models     ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test --help-models)
82 ADD_TEST(test-tracing-help    ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test --help-tracing)
83
84 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)
85 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)
86
87 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)
88 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)
89 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)
90
91 if(enable_debug AND NOT enable_memcheck)
92   # these tests need assertions. Exclude them from memcheck, as they normally die, leaving lots of unfree'd objects
93   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)
94   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)
95   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)
96
97    #These tests fail on Windows as the signal returned is not the same as Unix would send.
98   if(WIN32)
99     set_property(TEST tesh-parser-bogus-symmetric PROPERTY WILL_FAIL TRUE)
100     set_property(TEST tesh-parser-bogus-missing-gw PROPERTY WILL_FAIL TRUE)
101     set_property(TEST tesh-parser-bogus-disk-attachment PROPERTY WILL_FAIL TRUE)
102   endif()
103 endif()