Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
8efdcd397d81742cdc2e137bbd3fcb967aaa0237
[simgrid.git] / buildtools / pipol / CtestPipol.cmake
1 cmake_minimum_required(VERSION 2.6)
2
3 find_path(GCOV_PATH NAMES gcov PATHS NO_DEFAULT_PATHS)
4 find_path(VALGRIND_PATH NAMES valgrind  PATHS NO_DEFAULT_PATHS)
5 find_program(PWD_EXE NAMES pwd)
6 find_program(SED_EXE NAMES sed)
7
8 ### AUTO DETECT THE PROJECT_DIRECTORY
9 exec_program("${PWD_EXE}" ARGS "| ${SED_EXE} 's/\\/Cmake//g'" OUTPUT_VARIABLE PROJECT_DIRECTORY)
10 ### MANUAL PROJECT_DIRECTORY
11 #set(PROJECT_DIRECTORY "")
12
13 SET(CTEST_PROJECT_NAME "Simgrid")
14
15 SET(CTEST_BUILD_NAME "CTEST_UCONTEXT")
16 SET(CTEST_SITE "Pierre_Navarro")
17
18 SET(CTEST_SOURCE_DIRECTORY "./")
19 SET(CTEST_BINARY_DIRECTORY "./")
20 SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "3000000")
21 SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "3000000")
22
23 SET(CTEST_CMAKE_COMMAND "/home/navarrop/Programmes/cmake-2.8.0/bin/cmake ./")
24 SET(CTEST_CONFIGURE_COMMAND "/home/navarrop/Programmes/cmake-2.8.0/bin/cmake -Denable_coverage=on -Denable_memcheck=on ./")
25 SET(CTEST_COMMAND "/home/navarrop/Programmes/cmake-2.8.0/bin/ctest")
26 SET(CTEST_BUILD_COMMAND "/usr/bin/make -j3")
27 SET(CTEST_COVERAGE_COMMAND "${GCOV_PATH}/gcov")
28 SET(CTEST_VALGRIND_COMMAND "${VALGRIND_PATH}/valgrind")
29 SET(CTEST_MEMORYCHECK_COMMAND "${VALGRIND_PATH}/valgrind")
30 set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-reachable=yes --track-origins=yes --read-var-info=no")
31
32 if(IS_DIRECTORY ${PROJECT_DIRECTORY}/.svn)
33         SET(CTEST_UPDATE_COMMAND "/usr/bin/svn")
34 endif(IS_DIRECTORY ${PROJECT_DIRECTORY}/.svn)
35
36 if(IS_DIRECTORY ${PROJECT_DIRECTORY}/.git)
37         SET(CTEST_UPDATE_COMMAND "/usr/bin/git")
38 endif(IS_DIRECTORY ${PROJECT_DIRECTORY}/.git)
39
40 SET(CTEST_DROP_METHOD "http")
41 SET(CTEST_DROP_SITE "cdash.inria.fr/CDash")
42 SET(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}")
43 SET(CTEST_DROP_SITE_CDASH TRUE)
44 SET(CTEST_TRIGGER_SITE "http://cdash.inria.fr/CDash/cgi-bin/Submit-Random-TestingResults.cgi")
45
46 ###Custom ctest
47
48 #CTEST_CUSTOM_ERROR_MATCH                       Regular expression for errors during build process
49 #CTEST_CUSTOM_ERROR_EXCEPTION                   Regular expression for error exceptions during build process
50 #CTEST_CUSTOM_WARNING_MATCH                     Regular expression for warnings during build process
51 #CTEST_CUSTOM_WARNING_EXCEPTION                 Regular expression for warning exception during build process
52 #CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS          Maximum number of errors to display
53 #CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS        Maximum number of warnings to display
54 #CTEST_CUSTOM_TESTS_IGNORE                      List of tests to ignore during the Test stage
55 #CTEST_CUSTOM_MEMCHECK_IGNORE                   List of tests to ignore during the MemCheck stage
56 #CTEST_CUSTOM_PRE_TEST                          Command to execute before any tests are run during Test stage
57 #CTEST_CUSTOM_POST_TEST                         Command to execute after any tests are run during Test stage
58 #CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE   Maximum size of passed test output
59 #CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE   Maximum size of failed test output
60 #CTEST_CUSTOM_PRE_MEMCHECK                      Command to execute before any tests are run during MemCheck stage
61 #CTEST_CUSTOM_POST_MEMCHECK                     Command to execute after any tests are run during MemCheck stage
62 #CTEST_CUSTOM_COVERAGE_EXCLUDE                  Regular expression for excluding files from coverage testing 
63
64 SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
65 "${PROJECT_DIRECTORY}/tools/*"
66 "${PROJECT_DIRECTORY}/buildtools/*"
67 "${PROJECT_DIRECTORY}/include/*"
68 "${PROJECT_DIRECTORY}/examples/*"
69 "${PROJECT_DIRECTORY}/testsuite/*"
70 "${PROJECT_DIRECTORY}/teshsuite/*"
71 "${PROJECT_DIRECTORY}/src/bindings/*"
72 )
73
74 #ignore some memcheck tests
75 set(CTEST_CUSTOM_MEMCHECK_IGNORE
76         tesh-self-basic
77         tesh-self-cd
78         tesh-self-IO-broken-pipe
79         tesh-self-IO-orders
80         tesh-self-IO-bigsize
81         tesh-self-set-return
82         tesh-self-set-signal
83         tesh-self-set-timeout
84         tesh-self-set-ignore-output
85         tesh-self-catch-return
86         tesh-self-catch-signal
87         tesh-self-catch-timeout
88         tesh-self-catch-wrong-output
89         tesh-self-bg-basic
90         tesh-self-bg-set-signal
91         tesh-self-background
92         tesh-log-large
93         tesh-log-parallel
94         tesh-gras-dd-mem
95         tesh-gras-dd-rw
96         tesh-gras-dd-r_little32_4
97         tesh-gras-dd-r_little64
98         tesh-gras-dd-r_big32_8_4
99         tesh-gras-dd-r_big32_8
100         tesh-gras-dd-r_big32_2
101         tesh-gras-empty_main-rl
102         tesh-gras-empty_main-sg
103         tesh-simdag-reinit_costs
104         tesh-simdag-parser
105         tesh-simdag-flatifier
106         tesh-simdag-basic0
107         tesh-simdag-basic1
108         tesh-simdag-basic2
109         tesh-simdag-basic3
110         tesh-simdag-basic4
111         tesh-simdag-basic5
112         tesh-simdag-basic6
113         tesh-simdag-p2p-1
114         tesh-simdag-p2p-2
115         tesh-simdag-p2p-3
116         tesh-simdag-p2p-3
117         tesh-simdag-mxn-1
118         tesh-simdag-mxn-2
119         tesh-simdag-mxn-3
120         tesh-simdag-par-1
121         tesh-simdag-par-2
122         tesh-msg-get_sender
123         gras-ping-rl
124         gras-rpc-rl
125         gras-spawn-rl
126         gras-timer-rl
127         gras-chrono-rl
128         gras-simple_token-rl
129         gras-mmrpc-rl
130         gras-all2all-rl
131         gras-pmm-rl
132         gras-synchro-rl
133         gras-properties-rl
134         msg-sendrecv_CLM03
135         msg-sendrecv_Vegas
136         msg-sendrecv_Reno
137         msg-suspend
138         msg-masterslave
139         msg-masterslave-forwarder
140         msg-masterslave-failure
141         msg-masterslave-bypass
142         msg-migration
143         msg-ptask
144         msg-priority
145         msg-properties
146         msg-trace
147         msg-masterslave_cpu_ti
148         gras-properties-sg
149         amok-bandwidth-rl
150         amok-saturate-rl
151         simdag-test_simdag
152         simdag-test_simdag2
153         simdag-test_prop
154         simdag-metaxml_test
155         smpi-bcast
156         smpi-reduce
157 )
158
159 IF(${ARCH_32_BITS})
160         SET(CTEST_CUSTOM_MEMCHECK_IGNORE
161         ${CTEST_CUSTOM_MEMCHECK_IGNORE}
162         tesh-gras-msg_handle-sg-32
163         tesh-gras-small_sleep-sg-32
164         gras-ping-sg-32
165         gras-rpc-sg-32
166         gras-spawn-sg-32
167         gras-timer-sg-32
168         gras-chrono-sg-32
169         gras-simple_token-sg-32
170         gras-mmrpc-sg-32
171         gras-all2all-sg-32
172         gras-pmm-sg-32
173         gras-synchro-sg-32
174         amok-bandwidth-sg-32
175         amok-saturate-sg-32
176         )
177 ELSE(${ARCH_32_BITS})
178         SET(CTEST_CUSTOM_MEMCHECK_IGNORE
179         ${CTEST_CUSTOM_MEMCHECK_IGNORE}
180         tesh-gras-msg_handle-sg-64
181         tesh-gras-small_sleep-sg-64
182         gras-ping-sg-64
183         gras-rpc-sg-64
184         gras-spawn-sg-64
185         gras-timer-sg-64
186         gras-chrono-sg-64
187         gras-simple_token-sg-64
188         gras-mmrpc-sg-64
189         gras-all2all-sg-64
190         gras-pmm-sg-64
191         gras-synchro-sg-64
192         amok-bandwidth-sg-64
193         amok-saturate-sg-64
194         )
195 ENDIF(${ARCH_32_BITS})
196
197 if(HAVE_GTNETS)
198         SET(CTEST_CUSTOM_MEMCHECK_IGNORE
199         ${CTEST_CUSTOM_MEMCHECK_IGNORE}
200         msg-gtnets1
201         msg-gtnets2
202         msg-gtnets3
203         msg-gtnets4
204         msg-gtnets5
205         )
206 endif(HAVE_GTNETS)
207
208 if(HAVE_JAVA)
209         SET(CTEST_CUSTOM_MEMCHECK_IGNORE
210         ${CTEST_CUSTOM_MEMCHECK_IGNORE}
211         java-basic
212         java-pingpong
213         java-comm_time
214         java-suspend
215         )
216 endif(HAVE_JAVA)
217
218 ctest_start(Experimental)
219 ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
220 ctest_configure(BUILD "${CTEST_SOURCE_DIRECTORY}") 
221 ctest_build(BUILD "${CTEST_SOURCE_DIRECTORY}") 
222 ctest_test(BUILD "${CTEST_SOURCE_DIRECTORY}")
223 ctest_coverage(BUILD "${CTEST_SOURCE_DIRECTORY}")
224 ctest_memcheck(BUILD "${CTEST_SOURCE_DIRECTORY}")
225 ctest_submit()