diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-14 10:29:14 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-14 10:29:14 (GMT) |
commit | 631b88e42c3fb7e10dee390d170854e40c31fac0 (patch) | |
tree | 06d970c489848e65d9c27eb464674f9e1cfa0348 | |
parent | 01e7e16d34b23b1198455809860abe4e43d9606a (diff) | |
download | uscxml-631b88e42c3fb7e10dee390d170854e40c31fac0.zip uscxml-631b88e42c3fb7e10dee390d170854e40c31fac0.tar.gz uscxml-631b88e42c3fb7e10dee390d170854e40c31fac0.tar.bz2 |
Fixed vrml-server and added conditional for gcov
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | apps/samples/vrml/vrml-server.scxml | 87 | ||||
-rw-r--r-- | contrib/ctest/tests/generic.ctest | 2 | ||||
-rw-r--r-- | src/uscxml/Interpreter.cpp | 2 |
4 files changed, 46 insertions, 48 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fea1b5b..62c865d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,6 +149,7 @@ else() OPTION(BUILD_TESTS "Build USCXML tests" ON) OPTION(RUN_W3C_TESTS "Run W3C tests" ON) endif() +OPTION(ENABLE_GCOV "Compile with gcov support" OFF) # a dummy target to depend on the targets needed for tests, see: # http://stackoverflow.com/questions/733475/cmake-ctest-make-test-doesnt-build-tests @@ -185,7 +186,7 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") add_definitions(-fPIC) add_definitions(-Wunreachable-code) - if (CMAKE_BUILD_TYPE MATCHES ".*Deb.*") # when not building for debug + if (CMAKE_BUILD_TYPE MATCHES ".*Deb.*" AND ENABLE_GCOV) # when not building for debug # coverage information add_definitions(-fprofile-arcs) add_definitions(-ftest-coverage) diff --git a/apps/samples/vrml/vrml-server.scxml b/apps/samples/vrml/vrml-server.scxml index 6f376e8..8563cb9 100644 --- a/apps/samples/vrml/vrml-server.scxml +++ b/apps/samples/vrml/vrml-server.scxml @@ -283,52 +283,49 @@ <header name="Access-Control-Allow-Origin" value="*" /> <content fileexpr="processed[_event['fileStruct'].key][_event['fileStruct'].format].path" /> </respond> - <else> - <if cond="_event.name.endsWith('postponed')"> - <!-- - A postponed event we couldn't answer - --> - <respond status="404" to="_event.origin"> - <header name="Connection" value="close" /> - </respond> - <else> - <script> - print("Processing outfile " + _event['dest'] + " from model " + _event['file'] + "\n"); - </script> - <send target="#_osgvonvert.osgb"> - <param name="source" expr="models[_event['fileStruct'].key].path" /> - <param name="dest" expr="_event['dest']" /> - <param name="pitch" expr="_event.fileStruct.pitch" /> - <param name="roll" expr="_event.fileStruct.roll" /> - <param name="yaw" expr="_event.fileStruct.yaw" /> - <param name="zoom" expr="_event.fileStruct.zoom" /> - <param name="x" expr="_event.fileStruct.x" /> - <param name="y" expr="_event.fileStruct.y" /> - <param name="z" expr="_event.fileStruct.z" /> - <param name="width" expr="_event.fileStruct.width" /> - <param name="height" expr="_event.fileStruct.height" /> - <param name="autorotate" expr="_event.fileStruct.autorotate" /> - </send> - <!-- - Redeliver the event once the untilexpr is true. The untilexpr has to evaluate - into another valid expression that we will check again on stable configurations. - --> - <postpone - untilexpr=" - '\'' + _event['fileStruct'].key + '\' in processed && - \'' + _event['fileStruct'].format + '\'' + ' in processed[\'' + _event['fileStruct'].key + '\'] || - _event.name === \'convert.failure\' && _event.data.dest === \'' + _event['dest'] + '\'' - "/> - </else> - </if> - </else> + <else /> + <if cond="_event.name.endsWith('postponed')"> + <!-- + A postponed event we couldn't answer + --> + <respond status="404" to="_event.origin"> + <header name="Connection" value="close" /> + </respond> + <else /> + <script> + print("Processing outfile " + _event['dest'] + " from model " + _event['file'] + "\n"); + </script> + <send target="#_osgvonvert.osgb"> + <param name="source" expr="models[_event['fileStruct'].key].path" /> + <param name="dest" expr="_event['dest']" /> + <param name="pitch" expr="_event.fileStruct.pitch" /> + <param name="roll" expr="_event.fileStruct.roll" /> + <param name="yaw" expr="_event.fileStruct.yaw" /> + <param name="zoom" expr="_event.fileStruct.zoom" /> + <param name="x" expr="_event.fileStruct.x" /> + <param name="y" expr="_event.fileStruct.y" /> + <param name="z" expr="_event.fileStruct.z" /> + <param name="width" expr="_event.fileStruct.width" /> + <param name="height" expr="_event.fileStruct.height" /> + <param name="autorotate" expr="_event.fileStruct.autorotate" /> + </send> + <!-- + Redeliver the event once the untilexpr is true. The untilexpr has to evaluate + into another valid expression that we will check again on stable configurations. + --> + <postpone + untilexpr=" + '\'' + _event['fileStruct'].key + '\' in processed && + \'' + _event['fileStruct'].format + '\'' + ' in processed[\'' + _event['fileStruct'].key + '\'] || + _event.name === \'convert.failure\' && _event.data.dest === \'' + _event['dest'] + '\'' + "/> + </if> </if> - <else> - <!-- There is no such model --> - <respond status="404" to="_event.origin"> - <header name="Connection" value="close" /> - </respond> - </else> + <else /> + <!-- There is no such model --> + <respond status="404" to="_event.origin"> + <header name="Connection" value="close" /> + </respond> </if> </transition> diff --git a/contrib/ctest/tests/generic.ctest b/contrib/ctest/tests/generic.ctest index eb2b5fd..51db345 100644 --- a/contrib/ctest/tests/generic.ctest +++ b/contrib/ctest/tests/generic.ctest @@ -1 +1 @@ -set(CTEST_BUILD_OPTIONS "-DRUN_W3C_TESTS:BOOL=ON") +set(CTEST_BUILD_OPTIONS "-DRUN_W3C_TESTS:BOOL=ON -DENABLE_GCOV:BOOL=ON") diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index de2b8b5..0f98dc9 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -1191,7 +1191,7 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont if (_executableContent.find(content) == _executableContent.end()) { execContent = Factory::createExecutableContent(content.getLocalName(), content.getNamespaceURI(), this); if (!execContent) { - LOG(ERROR) << "No custom executable content known for '" + LOG(ERROR) << "No custom executable content known for element '" << content.getLocalName() << "' in namespace '" << content.getNamespaceURI() << "'"; return; } |