diff options
author | Stefan Radomski <sradomski@mintwerk.de> | 2015-07-05 23:15:31 (GMT) |
---|---|---|
committer | Stefan Radomski <sradomski@mintwerk.de> | 2015-07-05 23:15:31 (GMT) |
commit | f02d7e5919f16d8396839fcff1e0588d6ccf3004 (patch) | |
tree | ae16a349655763856d1286c017c5f29c916d6cd5 /test/w3c | |
parent | 1bc525a7992f560735bb7e0de6981e8e6f616246 (diff) | |
download | uscxml-f02d7e5919f16d8396839fcff1e0588d6ccf3004.zip uscxml-f02d7e5919f16d8396839fcff1e0588d6ccf3004.tar.gz uscxml-f02d7e5919f16d8396839fcff1e0588d6ccf3004.tar.bz2 |
Various extensions and bug-fixes
Diffstat (limited to 'test/w3c')
-rwxr-xr-x | test/w3c/analyze_tests.pl | 53 | ||||
-rw-r--r-- | test/w3c/run_promela_test.cmake | 18 |
2 files changed, 64 insertions, 7 deletions
diff --git a/test/w3c/analyze_tests.pl b/test/w3c/analyze_tests.pl index a14c129..b891066 100755 --- a/test/w3c/analyze_tests.pl +++ b/test/w3c/analyze_tests.pl @@ -30,6 +30,8 @@ if (!$testResultFile) { $testResultFile = File::Spec->catfile($toBaseDir, "../../build/cli/Testing/Temporary/LastTest.log"); } +print STDERR "Using log file from:\n\t$testResultFile\n"; + open(FILE, $testResultFile) or die $!; mkdir($outDir) or die($!) if (! -d $outDir); @@ -78,8 +80,8 @@ while ($block = <FILE>) { \<end\sof\soutput\>\n Test\stime\s\=\s+([\d\.]+)\s(\w+) /x ) { - $test->{$currTest}->{'duration'} = $1; - $test->{$currTest}->{'durationUnit'} = $2; + $test->{$currTest}->{'duration'}->{'total'} = $1; + $test->{$currTest}->{'duration'}->{'totalUnit'} = $2; # next; - no next as this is part of the actual test output we need to scan below } @@ -174,6 +176,53 @@ while ($block = <FILE>) { $test->{$currTest}->{'pml'}->{'memory'}->{'total'} = $7; } + if ($block =~ + / + pan:\selapsed\stime\s(.*)\sseconds\n + /x ) { + $test->{$currTest}->{'pml'}->{'duration'} = $1; + } + + if ($block =~ + / + real\s+([\d\.]+)\n + user\s+([\d\.]+)\n + sys\s+([\d\.]+)\n + --\stime\sfor\stransforming\sto\spromela\n + /x ) { + $test->{$currTest}->{'duration'}->{'toPML'} = $1; + } + + if ($block =~ + / + real\s+([\d\.]+)\n + user\s+([\d\.]+)\n + sys\s+([\d\.]+)\n + --\stime\sfor\stransforming\sto\sc\n + /x ) { + $test->{$currTest}->{'duration'}->{'toC'} = $1; + } + + if ($block =~ + / + real\s+([\d\.]+)\n + user\s+([\d\.]+)\n + sys\s+([\d\.]+)\n + --\stime\sfor\stransforming\sto\sbinary\n + /x ) { + $test->{$currTest}->{'duration'}->{'toBin'} = $1; + } + + if ($block =~ + / + real\s+([\d\.]+)\n + user\s+([\d\.]+)\n + sys\s+([\d\.]+)\n + --\stime\sfor\sverification\n + /x ) { + $test->{$currTest}->{'duration'}->{'toVerif'} = $1; + } + next; } diff --git a/test/w3c/run_promela_test.cmake b/test/w3c/run_promela_test.cmake index e6d2418..b403b7a 100644 --- a/test/w3c/run_promela_test.cmake +++ b/test/w3c/run_promela_test.cmake @@ -6,25 +6,33 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTDIR}) set(ENV{USCXML_PROMELA_TRANSITION_TRACE} "TRUE") set(ENV{USCXML_PROMELA_TRANSITION_DEBUG} "TRUE") -execute_process(COMMAND ${USCXML_TRANSFORM_BIN} -tpml -i ${TESTFILE} -o ${OUTDIR}/${TEST_FILE_NAME}.pml RESULT_VARIABLE CMD_RESULT) +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") -execute_process(COMMAND ${SPIN_BIN} -a ${OUTDIR}/${TEST_FILE_NAME}.pml WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT) +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") -execute_process(COMMAND ${GCC_BIN} -DMEMLIM=1024 -DVECTORSZ=8192 -O2 -DXUSAFE -w -o ${OUTDIR}/pan ${OUTDIR}/pan.c WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT) +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") -execute_process(COMMAND ${OUTDIR}/pan -m10000 -a WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT) +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 |