diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-10-12 11:11:06 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-10-12 11:11:06 (GMT) |
commit | fa90b5749693d9f5817ad1f106334a0877171fd3 (patch) | |
tree | 8d53b5c820590cad54893bc575ef55df38f55d23 /test/w3c/run_promela_test.cmake | |
parent | c36b123a60278caef5d06e8a7d0b3d338d669c75 (diff) | |
download | uscxml-fa90b5749693d9f5817ad1f106334a0877171fd3.zip uscxml-fa90b5749693d9f5817ad1f106334a0877171fd3.tar.gz uscxml-fa90b5749693d9f5817ad1f106334a0877171fd3.tar.bz2 |
Major work on PROMELA datamodel
Diffstat (limited to 'test/w3c/run_promela_test.cmake')
-rw-r--r-- | test/w3c/run_promela_test.cmake | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/w3c/run_promela_test.cmake b/test/w3c/run_promela_test.cmake new file mode 100644 index 0000000..e46ab60 --- /dev/null +++ b/test/w3c/run_promela_test.cmake @@ -0,0 +1,23 @@ +# convert given file to promela and run spin + +get_filename_component(TEST_FILE_NAME ${TESTFILE} NAME) + +execute_process(COMMAND ${USCXML_TRANSFORM_BIN} -s -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() + +execute_process(COMMAND ${SPIN_BIN} -a ${OUTDIR}/${TEST_FILE_NAME}.pml RESULT_VARIABLE CMD_RESULT) +if(CMD_RESULT) + message(FATAL_ERROR "Error running ${SPIN_BIN}: ${CMD_RESULT}") +endif() + +execute_process(COMMAND ${GCC_BIN} -DMEMLIM=1024 -O2 -DXUSAFE -w -o ${OUTDIR}/pan ${OUTDIR}/pan.c RESULT_VARIABLE CMD_RESULT) +if(CMD_RESULT) + message(FATAL_ERROR "Error running ${GCC_BIN}: ${CMD_RESULT}") +endif() + +execute_process(COMMAND ${OUTDIR}/pan -m10000 -a RESULT_VARIABLE CMD_RESULT) +if(CMD_RESULT) + message(FATAL_ERROR "Error running pan: ${CMD_RESULT}") +endif() |