diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-05-12 13:30:14 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-05-12 13:30:14 (GMT) |
commit | 59b51d5e70bd51a59d03c46e44148f53a0bf99a6 (patch) | |
tree | b82a80a45eaf0f7db7a0165d636f6e7c281bdf25 /test/ctest/scripts/run_promela_test.cmake | |
parent | 46b41e28989ea66eeebe0b8a35a52fb2d22abf3f (diff) | |
download | uscxml-59b51d5e70bd51a59d03c46e44148f53a0bf99a6.zip uscxml-59b51d5e70bd51a59d03c46e44148f53a0bf99a6.tar.gz uscxml-59b51d5e70bd51a59d03c46e44148f53a0bf99a6.tar.bz2 |
Corrected gitignore and travis config
Diffstat (limited to 'test/ctest/scripts/run_promela_test.cmake')
-rw-r--r-- | test/ctest/scripts/run_promela_test.cmake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/ctest/scripts/run_promela_test.cmake b/test/ctest/scripts/run_promela_test.cmake new file mode 100644 index 0000000..818cf66 --- /dev/null +++ b/test/ctest/scripts/run_promela_test.cmake @@ -0,0 +1,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 "${CXX_BIN} -DMEMLIM=1024 -DVECTORSZ=8192 -O2 -DXUSAFE -w -o ${OUTDIR}/pan ${OUTDIR}/pan.c") +execute_process(COMMAND time -p ${CXX_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 ${CXX_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})
\ No newline at end of file |