blob: b403b7a80fb97d4767e5e983bc089b5990e67fa5 (
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
|
# convert given file to promela and run spin
get_filename_component(TEST_FILE_NAME ${TESTFILE} NAME)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTDIR})
set(ENV{USCXML_PROMELA_TRANSITION_TRACE} "TRUE")
set(ENV{USCXML_PROMELA_TRANSITION_DEBUG} "TRUE")
message(STATUS "${USCXML_TRANSFORM_BIN} -tpml -i ${TESTFILE} -o ${OUTDIR}/${TEST_FILE_NAME}.pml")
execute_process(COMMAND time -p ${USCXML_TRANSFORM_BIN} -tpml -i ${TESTFILE} -o ${OUTDIR}/${TEST_FILE_NAME}.pml RESULT_VARIABLE CMD_RESULT)
if(CMD_RESULT)
message(FATAL_ERROR "Error running ${USCXML_TRANSFORM_BIN}: ${CMD_RESULT}")
endif()
message(STATUS "time for transforming to promela")
message(STATUS "${SPIN_BIN} -a ${OUTDIR}/${TEST_FILE_NAME}.pml")
execute_process(COMMAND time -p ${SPIN_BIN} -a ${OUTDIR}/${TEST_FILE_NAME}.pml WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT)
if(CMD_RESULT)
message(FATAL_ERROR "Error running spin ${SPIN_BIN}: ${CMD_RESULT}")
endif()
message(STATUS "time for transforming to c")
message(STATUS "${GCC_BIN} -DMEMLIM=1024 -DVECTORSZ=8192 -O2 -DXUSAFE -w -o ${OUTDIR}/pan ${OUTDIR}/pan.c")
execute_process(COMMAND time -p ${GCC_BIN} -DMEMLIM=1024 -DVECTORSZ=8192 -O2 -DXUSAFE -w -o ${OUTDIR}/pan ${OUTDIR}/pan.c WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT)
if(CMD_RESULT)
message(FATAL_ERROR "Error running gcc ${GCC_BIN}: ${CMD_RESULT}")
endif()
message(STATUS "time for transforming to binary")
message(STATUS "${OUTDIR}/pan -m10000 -a")
execute_process(COMMAND time -p ${OUTDIR}/pan -m10000 -a WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT)
if(CMD_RESULT)
message(FATAL_ERROR "Error running pan: ${CMD_RESULT}")
endif()
message(STATUS "time for verification")
# message(STATUS "${TEST_OUT}")
# file(WRITE ${OUTDIR}/${TEST_FILE_NAME}.pml.out ${TEST_OUT})
|