Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Test if valgrind is found for enable memcheck.
[simgrid.git] / buildtools / Cmake / AddTests.cmake
1 ### Be sure we can execut some launch file
2 exec_program("chmod a=rwx ${PROJECT_DIRECTORY}/buildtools/Cmake/test_java.sh" OUTPUT_VARIABLE "OKITOKI")
3 if(enable_smpi)
4         exec_program("chmod a=rwx ${PROJECT_DIRECTORY}/src/smpi/smpicc" OUTPUT_VARIABLE "OKITOKI")
5         exec_program("chmod a=rwx ${PROJECT_DIRECTORY}/src/smpi/smpirun" OUTPUT_VARIABLE "OKITOKI")
6 endif(enable_smpi)
7
8 if(enable_memcheck)
9         exec_program("valgrind --version " OUTPUT_VARIABLE "VALGRIND_VERSION")
10         if(VALGRIND_VERSION)
11                 string(REGEX MATCH "[0-9].[0-9].[0-9]" NEW_VALGRIND_VERSION "${VALGRIND_VERSION}")
12                 if(NEW_VALGRIND_VERSION)
13                 else(NEW_VALGRIND_VERSION)
14                         set(enable_memcheck false)
15                         message("Command valgrind not found --> enable_memcheck autoset to false.")
16                 endif(NEW_VALGRIND_VERSION)
17         else(VALGRIND_VERSION)
18                 set(enable_memcheck false)
19                 message("Command valgrind not found --> enable_memcheck autoset to false.")
20         endif(VALGRIND_VERSION)
21 endif(enable_memcheck)
22
23 ### For code coverage
24 ### Set some variables
25 SET(UPDATE_TYPE "svn")
26 SET(DROP_METHOD "http")
27 SET(DROP_SITE "cdash.inria.fr/CDash")
28 SET(DROP_LOCATION "/submit.php?project=${PROJECT_NAME}")
29 SET(DROP_SITE_CDASH TRUE)
30 SET(TRIGGER_SITE "http://cdash.inria.fr/CDash/cgi-bin/Submit-Random-TestingResults.cgi")
31 SET(COVERAGE_COMMAND "${GCOV_PATH}/gcov")
32 #SET(VALGRIND_COMMAND "${VALGRIND_PATH}/valgrind")
33 #SET(MEMORYCHECK_COMMAND "${VALGRIND_PATH}/valgrind")
34 #set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-reachable=yes --track-origins=yes --read-var-info=no")
35 set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-reachable=yes --track-origins=yes --read-var-info=no --valgrind ${VALGRIND_PATH}")
36 SET(VALGRIND_COMMAND "${PROJECT_DIRECTORY}/buildtools/Cmake/my_valgrind.pl")
37 SET(MEMORYCHECK_COMMAND "${PROJECT_DIRECTORY}/buildtools/Cmake/my_valgrind.pl")
38 #If you use the --read-var-info option Memcheck will run more slowly but may give a more detailed description of any illegal address.
39
40 ### Check 32bits or 64bits
41 INCLUDE (CheckTypeSize)
42 CHECK_TYPE_SIZE("long" SIZEOF_LONG)
43 IF(SIZEOF_LONG EQUAL 4)
44   SET(ARCH_32_BITS 1)
45 ELSE(SIZEOF_LONG EQUAL 4)
46   SET(ARCH_32_BITS 0)
47 ENDIF(SIZEOF_LONG EQUAL 4)
48
49 INCLUDE(CTest)
50 ENABLE_TESTING()
51
52 if(NOT enable_memcheck)
53 ADD_TEST(tesh-self-basic                ${CMAKE_BINARY_DIR}/bin/tesh --cd "${PROJECT_DIRECTORY}/tools/tesh" basic.tesh)
54 ADD_TEST(tesh-self-cd                   ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${PROJECT_DIRECTORY}/tools/tesh/cd.tesh)
55 ADD_TEST(tesh-self-IO-broken-pipe       ${CMAKE_BINARY_DIR}/bin/tesh --cd "${PROJECT_DIRECTORY}/tools/tesh" IO-broken-pipe.tesh)
56 ADD_TEST(tesh-self-IO-orders            ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${PROJECT_DIRECTORY}/tools/tesh/IO-orders.tesh)
57 ADD_TEST(tesh-self-IO-bigsize           ${CMAKE_BINARY_DIR}/bin/tesh --cd "${PROJECT_DIRECTORY}/tools/tesh" IO-bigsize.tesh)
58 ADD_TEST(tesh-self-set-return           ${CMAKE_BINARY_DIR}/bin/tesh --cd "${PROJECT_DIRECTORY}/tools/tesh" set-return.tesh)
59 ADD_TEST(tesh-self-set-signal           ${CMAKE_BINARY_DIR}/bin/tesh --cd "${PROJECT_DIRECTORY}/tools/tesh" set-signal.tesh)
60 ADD_TEST(tesh-self-set-timeout          ${CMAKE_BINARY_DIR}/bin/tesh --cd "${PROJECT_DIRECTORY}/tools/tesh" set-timeout.tesh)
61 ADD_TEST(tesh-self-set-ignore-output    ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${PROJECT_DIRECTORY}/tools/tesh/set-ignore-output.tesh)
62 ADD_TEST(tesh-self-catch-return         ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${PROJECT_DIRECTORY}/tools/tesh/catch-return.tesh)
63 ADD_TEST(tesh-self-catch-signal         ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${PROJECT_DIRECTORY}/tools/tesh/catch-signal.tesh)
64 ADD_TEST(tesh-self-catch-timeout        ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${PROJECT_DIRECTORY}/tools/tesh/catch-timeout.tesh)
65 ADD_TEST(tesh-self-catch-wrong-output   ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${PROJECT_DIRECTORY}/tools/tesh/catch-wrong-output.tesh)
66 ADD_TEST(tesh-self-bg-basic             ${CMAKE_BINARY_DIR}/bin/tesh --cd "${PROJECT_DIRECTORY}/tools/tesh" bg-basic.tesh)
67 ADD_TEST(tesh-self-bg-set-signal        ${CMAKE_BINARY_DIR}/bin/tesh --cd "${PROJECT_DIRECTORY}/tools/tesh" bg-set-signal.tesh)
68 ADD_TEST(tesh-self-background           ${CMAKE_BINARY_DIR}/bin/tesh --cd "${PROJECT_DIRECTORY}/tools/tesh" background.tesh)
69
70 # BEGIN TESH TESTS
71
72 # teshsuite/xbt
73 ADD_TEST(tesh-log-large         ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite xbt/log_large_test.tesh)
74 ADD_TEST(tesh-log-parallel      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite xbt/parallel_log_crashtest.tesh)
75
76 # teshsuite/gras/datadesc directory
77 ADD_TEST(tesh-gras-dd-mem       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/datadesc/datadesc_mem.tesh)
78 ADD_TEST(tesh-gras-dd-rw        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/datadesc/datadesc_rw.tesh)
79 ADD_TEST(tesh-gras-dd-r_little32_4      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/datadesc/datadesc_r_little32_4.tesh)
80 ADD_TEST(tesh-gras-dd-r_little64        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/datadesc/datadesc_r_little64.tesh)
81 ADD_TEST(tesh-gras-dd-r_big32_8_4       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/datadesc/datadesc_r_big32_8_4.tesh)
82 ADD_TEST(tesh-gras-dd-r_big32_8         ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/datadesc/datadesc_r_big32_8.tesh)
83 ADD_TEST(tesh-gras-dd-r_big32_2         ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/datadesc/datadesc_r_big32_2.tesh)
84
85 IF(${ARCH_32_BITS})
86   ADD_TEST(tesh-gras-msg_handle-sg-32   ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/msg_handle/test_sg_32)
87 ELSE(${ARCH_32_BITS})
88   ADD_TEST(tesh-gras-msg_handle-sg-64   ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/msg_handle/test_sg_64)
89 ENDIF(${ARCH_32_BITS})
90
91 ADD_TEST(tesh-gras-empty_main-rl        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/empty_main/test_rl)
92 ADD_TEST(tesh-gras-empty_main-sg        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/empty_main/test_sg)
93
94 IF(${ARCH_32_BITS})
95   ADD_TEST(tesh-gras-small_sleep-sg-32  ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/small_sleep/test_sg_32)
96 ELSE(${ARCH_32_BITS})
97   ADD_TEST(tesh-gras-small_sleep-sg-64  ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite gras/small_sleep/test_sg_64)
98 ENDIF(${ARCH_32_BITS})
99
100 ADD_TEST(tesh-msg-get_sender    ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite msg/get_sender.tesh)                               
101 ADD_TEST(tesh-simdag-reinit_costs       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/network/test_reinit_costs.tesh)
102 ADD_TEST(tesh-simdag-parser             ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/platforms/basic_parsing_test.tesh)
103 ADD_TEST(tesh-simdag-flatifier          ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/platforms/flatifier.tesh)
104 ADD_TEST(tesh-simdag-basic0     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/basic0.tesh)
105 ADD_TEST(tesh-simdag-basic1     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/basic1.tesh)
106 ADD_TEST(tesh-simdag-basic2     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/basic2.tesh)
107 ADD_TEST(tesh-simdag-basic3     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/basic3.tesh)
108 ADD_TEST(tesh-simdag-basic4     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/basic4.tesh)
109 ADD_TEST(tesh-simdag-basic5     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/basic5.tesh)
110 ADD_TEST(tesh-simdag-basic6     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/basic6.tesh)
111 ADD_TEST(tesh-simdag-p2p-1      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/network/p2p/test_latency1.tesh)
112 ADD_TEST(tesh-simdag-p2p-2      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/network/p2p/test_latency2.tesh)
113 ADD_TEST(tesh-simdag-p2p-3      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/network/p2p/test_latency3.tesh)
114 ADD_TEST(tesh-simdag-p2p-3      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/network/p2p/test_latency_bound.tesh)
115 ADD_TEST(tesh-simdag-mxn-1      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/network/mxn/test_intra_all2all.tesh)
116 ADD_TEST(tesh-simdag-mxn-2      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/network/mxn/test_intra_independent_comm.tesh)
117 ADD_TEST(tesh-simdag-mxn-3      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/network/mxn/test_intra_scatter.tesh)
118 ADD_TEST(tesh-simdag-par-1      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/partask/test_comp_only_seq.tesh)
119 ADD_TEST(tesh-simdag-par-2      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/teshsuite simdag/partask/test_comp_only_par.tesh)
120
121 # GRAS examples
122 ADD_TEST(gras-ping-rl           ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/ping test_rl)
123 ADD_TEST(gras-rpc-rl            ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/rpc test_rl)
124 ADD_TEST(gras-spawn-rl          ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/spawn test_rl)
125 ADD_TEST(gras-timer-rl          ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/timer test_rl)
126 ADD_TEST(gras-chrono-rl         ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/chrono test_rl)
127 ADD_TEST(gras-simple_token-rl   ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/mutual_exclusion/simple_token test_rl)
128 ADD_TEST(gras-mmrpc-rl          ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/mmrpc test_rl)
129 ADD_TEST(gras-all2all-rl        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/all2all test_rl)
130 ADD_TEST(gras-pmm-rl            ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/pmm test_rl)
131 ADD_TEST(gras-synchro-rl        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/synchro test_rl)
132 ADD_TEST(gras-properties-rl     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/properties test_rl)
133
134 # MSG examples
135 ADD_TEST(msg-sendrecv_CLM03     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg sendrecv/sendrecv_CLM03.tesh)
136 ADD_TEST(msg-sendrecv_Vegas     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg sendrecv/sendrecv_Vegas.tesh)
137 ADD_TEST(msg-sendrecv_Reno      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg sendrecv/sendrecv_Reno.tesh)
138 ADD_TEST(msg-suspend            ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg suspend/suspend.tesh)
139 ADD_TEST(msg-masterslave        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg masterslave/masterslave.tesh)
140 ADD_TEST(msg-masterslave-forwarder      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg masterslave/masterslave_forwarder.tesh)
141 ADD_TEST(msg-masterslave-failure        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg masterslave/masterslave_failure.tesh)
142 ADD_TEST(msg-masterslave-bypass ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg masterslave/masterslave_bypass.tesh)
143 ADD_TEST(msg-masterslave-mailbox        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg masterslave/masterslave_mailbox.tesh)
144 ADD_TEST(msg-masterslave-vivaldi        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg masterslave/masterslave_vivaldi.tesh)
145 ADD_TEST(msg-migration          ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg migration/migration.tesh)
146 ADD_TEST(msg-ptask              ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg parallel_task/parallel_task.tesh)
147 ADD_TEST(msg-priority           ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg priority/priority.tesh)
148 ADD_TEST(msg-properties         ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg properties/msg_prop.tesh)
149 ADD_TEST(msg-trace              ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg trace/trace.tesh)
150 ADD_TEST(msg-masterslave_cpu_ti ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti.tesh)
151
152 IF(HAVE_TRACING)
153   ADD_TEST(tracing-ms ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg tracing/ms.tesh)
154   ADD_TEST(tracing-categories ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg tracing/categories.tesh)
155   ADD_TEST(tracing-volume ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg tracing/volume.tesh)
156   ADD_TEST(tracing-tasks ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg tracing/tasks.tesh)
157   ADD_TEST(tracing-process-migration ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg tracing/procmig.tesh)
158 ENDIF(HAVE_TRACING)
159
160 IF(${ARCH_32_BITS})
161   ADD_TEST(gras-ping-sg-32      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/ping test_sg_32)
162   ADD_TEST(gras-rpc-sg-32       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/rpc test_sg_32)
163   ADD_TEST(gras-spawn-sg-32     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/spawn test_sg_32)
164   ADD_TEST(gras-timer-sg-32     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/timer test_sg_32)
165   ADD_TEST(gras-chrono-sg-32    ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/chrono test_sg_32)
166   ADD_TEST(gras-simple_token-sg-32      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/mutual_exclusion/simple_token test_sg_32)
167   ADD_TEST(gras-mmrpc-sg-32     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/mmrpc test_sg_32)
168   ADD_TEST(gras-all2all-sg-32   ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/all2all test_sg_32)
169   ADD_TEST(gras-pmm-sg-32       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/pmm test_sg_32)
170   ADD_TEST(gras-synchro-sg-32   ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/synchro test_sg_32)
171 ELSE(${ARCH_32_BITS})
172   ADD_TEST(gras-ping-sg-64      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/ping test_sg_64)
173   ADD_TEST(gras-rpc-sg-64       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/rpc test_sg_64)
174   ADD_TEST(gras-spawn-sg-64     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/spawn test_sg_64)
175   ADD_TEST(gras-timer-sg-64     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/timer test_sg_64)
176   ADD_TEST(gras-chrono-sg-64    ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/chrono test_sg_64)
177   ADD_TEST(gras-simple_token-sg-64      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/mutual_exclusion/simple_token test_sg_64)
178   ADD_TEST(gras-mmrpc-sg-64     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/mmrpc test_sg_64)
179   ADD_TEST(gras-all2all-sg-64   ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/all2all test_sg_64)
180   ADD_TEST(gras-pmm-sg-64       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/pmm test_sg_64)
181   ADD_TEST(gras-synchro-sg-64   ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/synchro test_sg_64)
182 ENDIF(${ARCH_32_BITS})
183 ADD_TEST(gras-properties-sg     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/gras/properties test_sg)
184
185 # amok examples
186 ADD_TEST(amok-bandwidth-rl      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/amok bandwidth/bandwidth_rl.tesh)
187 ADD_TEST(amok-saturate-rl       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/amok saturate/saturate_rl.tesh)
188 IF(${ARCH_32_BITS})
189   ADD_TEST(amok-bandwidth-sg-32 ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/amok bandwidth/bandwidth_sg_32.tesh)
190   ADD_TEST(amok-saturate-sg-32  ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/amok saturate/saturate_sg_32.tesh)
191 ELSE(${ARCH_32_BITS})
192   ADD_TEST(amok-bandwidth-sg-64 ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/amok bandwidth/bandwidth_sg_64.tesh)
193   ADD_TEST(amok-saturate-sg-64  ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/amok saturate/saturate_sg_64.tesh)
194 ENDIF(${ARCH_32_BITS})
195
196 # simdag examples
197 ADD_TEST(simdag-test_simdag     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/simdag test_simdag.tesh)
198 ADD_TEST(simdag-test_simdag2    ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/simdag test_simdag2.tesh)
199 ADD_TEST(simdag-test_prop       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/simdag properties/test_prop.tesh)
200 ADD_TEST(simdag-metaxml_test    ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/simdag metaxml/metaxml_test.tesh)
201
202 if(enable_smpi)
203 # smpi examples
204 ADD_TEST(smpi-bcast     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/smpi bcast.tesh)
205 ADD_TEST(smpi-reduce    ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/smpi reduce.tesh)
206 endif(enable_smpi)
207
208 if(HAVE_GTNETS)
209 ADD_TEST(msg-gtnets-waxman      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg gtnets/gtnets-waxman.tesh)
210 ADD_TEST(msg-gtnets-dogbone     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg gtnets/gtnets-dogbone-gtnets.tesh)
211 ADD_TEST(msg-gtnets-onelink     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg gtnets/gtnets-onelink-gtnets.tesh)
212 ADD_TEST(msg-gtnets-dogbone-lv08        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg gtnets/gtnets-dogbone-lv08.tesh)
213 ADD_TEST(msg-gtnets-onelink-lv08        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg gtnets/gtnets-onelink-lv08.tesh)
214 endif(HAVE_GTNETS)
215
216 # Lua examples
217 if(HAVE_LUA)
218 ADD_TEST(lua-masterslave        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/lua master_slave.tesh)
219 ADD_TEST(lua-mult_matrix        ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/lua mult_matrix.tesh)
220 endif(HAVE_LUA)
221
222 # Ruby examples
223 if(HAVE_RUBY)
224 ADD_TEST(ruby-masterslave       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/ruby MasterSlave.tesh)
225 ADD_TEST(ruby-ping_pong         ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/ruby PingPong.tesh)
226 ADD_TEST(ruby-quicksort         ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/ruby Quicksort.tesh)
227 endif(HAVE_RUBY)
228
229 # END TESH TESTS
230
231 ADD_TEST(mc-bugged1                     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg/mc bugged1.tesh)
232 ADD_TEST(mc-bugged2                     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg/mc bugged2.tesh)
233 ADD_TEST(mc-centralized         ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg/mc centralized.tesh)
234
235 if(HAVE_JAVA)
236 # java examples
237 ADD_TEST(java-basic     ${PROJECT_DIRECTORY}/buildtools/Cmake/test_java.sh ${PROJECT_DIRECTORY}/examples/java/basic BasicTest ${PROJECT_DIRECTORY})
238 ADD_TEST(java-pingpong  ${PROJECT_DIRECTORY}/buildtools/Cmake/test_java.sh ${PROJECT_DIRECTORY}/examples/java/ping_pong PingPongTest ${PROJECT_DIRECTORY})
239 ADD_TEST(java-comm_time ${PROJECT_DIRECTORY}/buildtools/Cmake/test_java.sh ${PROJECT_DIRECTORY}/examples/java/comm_time CommTimeTest ${PROJECT_DIRECTORY})
240 ADD_TEST(java-suspend   ${PROJECT_DIRECTORY}/buildtools/Cmake/test_java.sh ${PROJECT_DIRECTORY}/examples/java/suspend SuspendTest ${PROJECT_DIRECTORY})
241 endif(HAVE_JAVA)
242
243 ###
244 ### Declare that we know that some tests are broken
245 ###
246
247 # Amok is broken in RL since before v3.3 (should fix it one day)
248 set_tests_properties(amok-bandwidth-rl PROPERTIES WILL_FAIL true)
249 set_tests_properties(amok-saturate-rl PROPERTIES WILL_FAIL true)
250
251 # Expected to fail until we regenerate the data
252 set_tests_properties(tesh-gras-dd-r_big32_8 PROPERTIES WILL_FAIL true)
253 set_tests_properties(tesh-gras-dd-r_big32_2 PROPERTIES WILL_FAIL true)
254
255 # Expected to fail until the parser gets better (v3.3.5?)
256 set_tests_properties(simdag-metaxml_test PROPERTIES WILL_FAIL true)   
257 set_tests_properties(tesh-simdag-flatifier PROPERTIES WILL_FAIL true)
258
259 if(HAVE_RUBY)
260 set_tests_properties(ruby-quicksort PROPERTIES WILL_FAIL true)
261 endif(HAVE_RUBY)
262 endif(NOT enable_memcheck)
263
264 # testsuite directory
265 add_test(test-xbt-log           ${PROJECT_DIRECTORY}/testsuite/xbt/log_usage)
266 add_test(test-xbt-graphxml      ${PROJECT_DIRECTORY}/testsuite/xbt/graphxml_usage ${PROJECT_DIRECTORY}/testsuite/xbt/graph.xml)
267 add_test(test-xbt-heap          ${PROJECT_DIRECTORY}/testsuite/xbt/heap_bench)
268
269 add_test(test-surf-lmm          ${PROJECT_DIRECTORY}/testsuite/surf/lmm_usage)
270 add_test(test-surf-maxmin       ${PROJECT_DIRECTORY}/testsuite/surf/maxmin_bench)
271 add_test(test-surf-usage        ${PROJECT_DIRECTORY}/testsuite/surf/surf_usage  --cfg=path:${PROJECT_DIRECTORY}/testsuite/surf/ platform.xml)
272 add_test(test-surf_usage2       ${PROJECT_DIRECTORY}/testsuite/surf/surf_usage2  --cfg=path:${PROJECT_DIRECTORY}/testsuite/surf/ platform.xml)
273 add_test(test-surf-trace        ${PROJECT_DIRECTORY}/testsuite/surf/trace_usage --cfg=path:${PROJECT_DIRECTORY}/testsuite/surf/)
274
275 add_test(test-simdag-1 ${PROJECT_DIRECTORY}/testsuite/simdag/sd_test --cfg=path:${PROJECT_DIRECTORY}/testsuite/simdag small_platform_variable.xml)
276 add_test(test-simdag-2 ${PROJECT_DIRECTORY}/testsuite/simdag/sd_test --cfg=path:${PROJECT_DIRECTORY}/testsuite/simdag ${PROJECT_DIRECTORY}/examples/msg/small_platform.xml)
277 add_test(test-simdag-3 ${PROJECT_DIRECTORY}/testsuite/simdag/sd_test --cfg=path:${PROJECT_DIRECTORY}/testsuite/simdag ${PROJECT_DIRECTORY}/examples/msg/msg_platform.xml)
278
279 add_test(testall                ${CMAKE_BUILD_DIR}/src/testall)
280
281 include(${PROJECT_DIRECTORY}/buildtools/Cmake/memcheck_tests.cmake)