blob: 1e29bf56d2dd47eeaea0ea5bcd88cedbea532c8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
|
set(TEST_TIMEOUT 15)
set(TEST_BENCHMARK_ITERATIONS 1000)
function(USCXML_TEST_COMPILE)
set(options BUILD_ONLY)
set(oneValueArgs LABEL NAME)
set(multiValueArgs FILES ARGS)
cmake_parse_arguments(USCXML_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
add_executable(${USCXML_TEST_NAME} ${USCXML_TEST_FILES})
target_link_libraries(${USCXML_TEST_NAME} uscxml)
if (NOT ${USCXML_TEST_BUILD_ONLY})
add_test(${USCXML_TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${USCXML_TEST_NAME} ${USCXML_TEST_ARGS})
set_property(TEST ${USCXML_TEST_NAME} PROPERTY LABELS ${USCXML_TEST_LABEL})
endif()
set_target_properties(${USCXML_TEST_NAME} PROPERTIES FOLDER "Tests")
endfunction()
if (NOT WIN32)
USCXML_TEST_COMPILE(NAME test-predicates LABEL general/test-predicates FILES src/test-predicates.cpp)
USCXML_TEST_COMPILE(BUILD_ONLY NAME test-vxml-mmi-socket LABEL general/test-vxml-mmi-socket FILES src/test-vxml-mmi-socket.cpp)
USCXML_TEST_COMPILE(BUILD_ONLY NAME test-vxml-mmi-http LABEL general/test-vxml-mmi-http FILES src/test-vxml-mmi-http.cpp)
USCXML_TEST_COMPILE(BUILD_ONLY NAME test-arabica-xpath LABEL general/test-arabica-xpath FILES src/test-arabica-xpath.cpp)
USCXML_TEST_COMPILE(NAME test-mmi LABEL general/test-mmi FILES src/test-mmi.cpp)
USCXML_TEST_COMPILE(NAME test-trie LABEL general/test-trie FILES src/test-trie.cpp)
USCXML_TEST_COMPILE(NAME test-arabica-namespaces LABEL general/test-arabica-namespaces FILES src/test-arabica-namespaces.cpp)
USCXML_TEST_COMPILE(NAME test-arabica-events LABEL general/test-arabica-events FILES src/test-arabica-events.cpp
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/uscxml/arabica/test-arabica-events.xml)
USCXML_TEST_COMPILE(NAME test-arabica-parsing LABEL general/test-arabica-parsing FILES src/test-arabica-parsing.cpp)
USCXML_TEST_COMPILE(NAME test-promela-parser LABEL general/test-promela-parser FILES src/test-promela-parser.cpp)
target_link_libraries(test-promela-parser uscxml_transform)
USCXML_TEST_COMPILE(BUILD_ONLY NAME test-stress LABEL general/test-stress FILES src/test-stress.cpp)
USCXML_TEST_COMPILE(NAME test-c-machine LABEL general/test-c-machine FILES src/test-c-machine.cpp)
USCXML_TEST_COMPILE(NAME test-misc LABEL general/test-misc FILES src/test-misc.cpp)
endif()
if (APPLE)
USCXML_TEST_COMPILE(BUILD_ONLY NAME test-dirmon LABEL general/test-dirmon FILES src/test-dirmon.cpp)
endif()
USCXML_TEST_COMPILE(BUILD_ONLY NAME test-sockets LABEL general/test-sockets FILES src/test-sockets.cpp)
USCXML_TEST_COMPILE(NAME test-url LABEL general/test-url FILES src/test-url.cpp)
USCXML_TEST_COMPILE(NAME test-doneevent LABEL general/test-doneevent FILES src/test-doneevent.cpp)
USCXML_TEST_COMPILE(NAME test-base64 LABEL general/test-base64 FILES src/test-base64.cpp)
USCXML_TEST_COMPILE(NAME test-eventdelay LABEL general/test-eventdelay FILES src/test-eventdelay.cpp)
USCXML_TEST_COMPILE(NAME test-flat-stateid LABEL general/test-flat-stateid FILES src/test-flat-stateid.cpp)
target_link_libraries(test-flat-stateid uscxml_transform)
USCXML_TEST_COMPILE(NAME test-lifecycle LABEL general/test-lifecycle FILES src/test-lifecycle.cpp)
USCXML_TEST_COMPILE(NAME test-issue-reporting LABEL general/test-issue-reporting FILES src/test-issue-reporting.cpp)
USCXML_TEST_COMPILE(NAME test-cmdline-parsing LABEL general/test-cmdline-parsing FILES src/test-cmdline-parsing.cpp)
USCXML_TEST_COMPILE(NAME test-datamodel LABEL general/test-datamodel FILES src/test-datamodel.cpp)
if (EXPECT_FOUND AND TCL_FOUND)
USCXML_TEST_COMPILE(BUILD_ONLY NAME test-expect LABEL general/test-expect FILES src/test-expect.cpp)
endif()
if (LIBPURPLE_FOUND)
USCXML_TEST_COMPILE(BUILD_ONLY NAME test-instant-messaging LABEL general/test-instant-messaging FILES src/test-instant-messaging.cpp)
endif()
if (FFMPEG_FOUND)
USCXML_TEST_COMPILE(BUILD_ONLY NAME test-ffmpeg LABEL general/test-ffmpeg FILES src/test-ffmpeg.cpp)
endif()
if (SWI_FOUND)
add_test(test-prolog-swi ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser -t2345 ${CMAKE_SOURCE_DIR}/test/uscxml/test-prolog.scxml)
endif()
if (ECMA_FOUND)
add_test(test-ecmascript ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/uscxml/test-ecmascript.scxml)
endif()
add_test(test-execution ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/uscxml/test-execution.scxml)
add_test(test-communication ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser -t5493 ${CMAKE_SOURCE_DIR}/test/uscxml/test-communication.scxml)
add_test(test-done-data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/uscxml/test-donedata.scxml)
# declare W#C tests
find_program(SPIN spin)
find_program(GCC gcc)
find_program(GPP g++)
if (NOT BUILD_MINIMAL)
# compile and add all reported issues tests
add_executable(test-w3c src/test-w3c.cpp)
target_link_libraries(test-w3c uscxml uscxml_transform)
set_target_properties(test-w3c PROPERTIES FOLDER "Tests")
# copy resources
file(GLOB_RECURSE W3C_RESOURCES
w3c/*.txt
w3c/*sub*.scxml
)
set(TEST_CLASSES
# standard tests generated per datamodel
"ecma"
"xpath"
"null"
"lua"
"promela"
# generated c source
"gen/c/ecma"
"gen/c/xpath"
"gen/c/lua"
"gen/c/promela"
"gen/vhdl/ecma"
# state-machine interpreters
"fsm/ecma"
"fsm/xpath"
"fsm/lua"
"fsm/promela"
# minimized interpreters
"min/ecma"
"min/xpath"
"min/lua"
"min/promela"
# performance tests
"perf/gen/c/ecma"
"perf/ecma")
# prepare directories for test classes and copy resources over
foreach(W3C_RESOURCE ${W3C_RESOURCES} )
get_filename_component(TEST_DATAMODEL ${W3C_RESOURCE} NAME)
foreach(TEST_CLASS ${TEST_CLASSES})
# datamodel has to be the suffix of the test class
if (TEST_CLASS MATCHES ".*/${TEST_DATAMODEL}$")
file(COPY ${W3C_RESOURCE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${TEST_CLASS})
endif()
endforeach()
endforeach()
# establish actual tests
foreach(TEST_CLASS ${TEST_CLASSES})
get_filename_component(TEST_DATAMODEL ${TEST_CLASS} NAME)
get_filename_component(TEST_TYPE ${TEST_CLASS} PATH)
# get all respective scxml files into W3C_TESTS
file(GLOB_RECURSE W3C_TESTS w3c/${TEST_DATAMODEL}/*.scxml)
SET(IS_PERFORMANCE_TEST OFF)
if (TEST_CLASS MATCHES "^perf/.*")
SET(IS_PERFORMANCE_TEST ON)
endif()
if (IS_PERFORMANCE_TEST)
string(REGEX REPLACE "^perf/?" "" TEST_TYPE ${TEST_TYPE})
endif()
SET(IS_STANDARD_TEST OFF)
if ("${TEST_TYPE}" STREQUAL "")
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/w3c/${TEST_DATAMODEL}")
SET(IS_STANDARD_TEST ON)
endif()
endif()
# normal IRP tests - get all scxml files within
foreach(W3C_TEST ${W3C_TESTS} )
get_filename_component(TEST_FILE ${W3C_TEST} NAME)
set(TEST_NAME "${TEST_CLASS}/${TEST_FILE}")
if (NOT TEST_NAME MATCHES ".*sub.*")
if (IS_STANDARD_TEST)
add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST})
if (TEST_NAME MATCHES ".*/test250.scxml")
set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "entering final state, invocation was not cancelled")
elseif (TEST_NAME MATCHES ".*/test307.scxml")
set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "error in state")
endif()
# more properties for standard tests
else()
if (TEST_TYPE MATCHES "^gen.*")
get_filename_component(TEST_TARGET ${TEST_TYPE} NAME)
if (TEST_TYPE MATCHES "^gen/${TEST_TARGET}")
# generate native interpreters
add_test(NAME "${TEST_NAME}"
COMMAND ${CMAKE_COMMAND}
-DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/${TEST_CLASS}
-DTESTFILE:FILEPATH=${W3C_TEST}
-DTARGETLANG=${TEST_TARGET}
-DJSC_LIBRARY:FILEPATH=${JSC_LIBRARY}
-DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform
-DGCC_BIN:FILEPATH=${GCC}
-DGPP_BIN:FILEPATH=${GPP}
-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
-DUSCXML_PLATFORM_ID=${USCXML_PLATFORM_ID}
-DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}
-DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR}
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-DSCAFFOLDING_FOR_GENERATED_C:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/src/test-c-machine.cpp
-P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_generated_test.cmake)
set_tests_properties("${TEST_NAME}" PROPERTIES DEPENDS uscxml-transform)
endif()
elseif (TEST_TYPE MATCHES "^min.*")
add_test(NAME "${TEST_NAME}"
COMMAND ${CMAKE_COMMAND}
-DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/ecma
-DTESTFILE:FILEPATH=${W3C_TEST}
-DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform
-DUSCXML_W3C_TEST_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c
-P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_minimized_test.cmake)
elseif (TEST_TYPE MATCHES "^fsm.*")
add_test("${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST})
endif()
endif()
set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME})
set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT})
if (IS_PERFORMANCE_TEST)
set_tests_properties("${TEST_NAME}" PROPERTIES ENVIRONMENT USCXML_BENCHMARK_ITERATIONS=${TEST_BENCHMARK_ITERATIONS})
endif()
endif()
endforeach()
endforeach()
# # iterate all SCXML files in test directory
# foreach( W3C_TEST ${W3C_TESTS} )
# string(REGEX MATCH "[^//]+/[^//]+.scxml" TEST_NAME ${W3C_TEST})
# message("TEST_NAME: ${TEST_NAME}")
# if (NOT TEST_NAME MATCHES ".*sub.*")
#
# # add new test
# add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST})
# set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME})
# set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT})
#
# if (BUILD_TESTS_W3C_ECMA AND TEST_NAME MATCHES "^ecma\\/.*")
# add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST})
# set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME})
# set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT})
#
# # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED")
#
# if (TEST_NAME STREQUAL "ecma/test250.scxml")
# set_tests_properties(${TEST_NAME} PROPERTIES
# FAIL_REGULAR_EXPRESSION "entering final state, invocation was not cancelled")
# elseif (TEST_NAME STREQUAL "ecma/test307.scxml")
# set_tests_properties(${TEST_NAME} PROPERTIES
# FAIL_REGULAR_EXPRESSION "error in state")
# endif()
# endif()
#
# if (BUILD_TESTS_GENERATED_C AND TEST_NAME MATCHES "^ecma\\/.*")
# add_test(NAME "gen_c/${TEST_NAME}"
# COMMAND ${CMAKE_COMMAND}
# -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/gen_c
# -DTESTFILE:FILEPATH=${W3C_TEST}
# -DJSC_LIBRARY:FILEPATH=${JSC_LIBRARY}
# -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform
# -DGCC_BIN:FILEPATH=${GCC}
# -DGPP_BIN:FILEPATH=${GPP}
# -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
# -DUSCXML_PLATFORM_ID=${USCXML_PLATFORM_ID}
# -DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}
# -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR}
# -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
# -DSCAFFOLDING_FOR_GENERATED_C:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/src/test-c-machine.cpp
# -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_generated_c_test.cmake)
# set_property(TEST "gen_c/${TEST_NAME}" PROPERTY LABELS "gen_c/${TEST_NAME}")
# set_tests_properties("gen_c/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# set_tests_properties("gen_c/${TEST_NAME}" PROPERTIES DEPENDS uscxml-transform)
#
# endif()
#
# if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_ECMA AND TEST_NAME MATCHES "^ecma\\/.*")
# add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST})
# set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}")
# set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT})
#
# add_test(NAME "minimized/${TEST_NAME}"
# COMMAND ${CMAKE_COMMAND}
# -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/ecma
# -DTESTFILE:FILEPATH=${W3C_TEST}
# -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform
# -DUSCXML_W3C_TEST_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c
# -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_minimized_test.cmake)
# set_property(TEST "minimized/${TEST_NAME}" PROPERTY LABELS "minimized/${TEST_NAME}")
# set_tests_properties("minimized/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT})
#
# set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS uscxml-transform)
# set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS test-w3c)
#
# # add_test(NAME "fsm/minimized/${TEST_NAME}"
# # COMMAND ${CMAKE_COMMAND}
# # -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/ecma
# # -DTESTFILE:FILEPATH=${W3C_TEST}
# # -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform
# # -DUSCXML_W3C_TEST_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c
# # -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_minimized_flat_test.cmake)
# # set_property(TEST "fsm/minimized/${TEST_NAME}" PROPERTY LABELS "fsm/minimized/${TEST_NAME}")
# # set_tests_properties("fsm/minimized/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT})
#
# # set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS uscxml-transform)
# # set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS test-w3c)
#
# endif()
#
# if (BUILD_TESTS_W3C_XPATH AND TEST_NAME MATCHES "^xpath\\/.*")
# add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST})
# set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME})
# set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED")
# if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_XPATH)
# add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST})
# set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}")
# set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# endif()
# endif()
#
# if (BUILD_DM_LUA AND LUA_FOUND AND BUILD_TESTS_W3C_LUA AND TEST_NAME MATCHES "^lua\\/.*")
# add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST})
# set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME})
# set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED")
# if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_LUA)
# add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST})
# set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}")
# set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# endif()
#
# endif()
#
# if (BUILD_DM_PROLOG AND SWI_FOUND AND BUILD_TESTS_W3C_PROLOG AND TEST_NAME MATCHES "^prolog\\/.*")
# add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST})
# set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME})
# set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED")
# if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_PROLOG)
# add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST})
# set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}")
# set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# endif()
# endif()
#
# if (BUILD_DM_PROMELA AND BUILD_TESTS_W3C_PROMELA AND TEST_NAME MATCHES "^promela\\/.*")
# add_test(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c ${W3C_TEST})
# set_property(TEST ${TEST_NAME} PROPERTY LABELS ${TEST_NAME})
# set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED")
# if (BUILD_TESTS_FSM AND BUILD_TESTS_FSM_PROMELA)
# add_test("fsm/${TEST_NAME}" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-w3c -f ${W3C_TEST})
# set_property(TEST "fsm/${TEST_NAME}" PROPERTY LABELS "fsm/${TEST_NAME}")
# set_tests_properties("fsm/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# endif()
# endif()
#
# if (GCC AND SPIN AND BUILD_DM_PROMELA AND BUILD_TESTS_W3C_PROMELA AND TEST_NAME MATCHES "^promela\\/.*")
#
# add_test(NAME "spin/${TEST_NAME}"
# COMMAND ${CMAKE_COMMAND}
# -DOUTDIR:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/promela
# -DTESTFILE:FILEPATH=${W3C_TEST}
# -DUSCXML_TRANSFORM_BIN:FILEPATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-transform
# -DSPIN_BIN:FILEPATH=${SPIN}
# -DGCC_BIN:FILEPATH=${GCC}
# -P ${CMAKE_CURRENT_SOURCE_DIR}/w3c/run_promela_test.cmake)
# set_property(TEST "spin/${TEST_NAME}" PROPERTY LABELS "spin/${TEST_NAME}")
# set_tests_properties("spin/${TEST_NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT})
# set_tests_properties("spin/${TEST_NAME}" PROPERTIES PASS_REGULAR_EXPRESSION "depth reached [0-9]+, errors: 0")
# set_tests_properties("spin/${TEST_NAME}" PROPERTIES FAIL_REGULAR_EXPRESSION "depth reached [0-9]+, errors: [1-9]+")
#
# set_tests_properties(${TEST_NAME} PROPERTIES DEPENDS uscxml-transform)
# # set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "TEST FAILED")
# endif()
#
# endif()
# endforeach()
endif()
|