Commit 765b2ceb authored by jcarpent's avatar jcarpent
Browse files

[Unit test] Update python parser unit test to reflect change

parent 2b617621
......@@ -296,6 +296,7 @@ ENDFOREACH(header)
ADD_SUBDIRECTORY(src)
# --- BINDINGS -----------------------------------------------------------------
SET(PYWRAP ${PROJECT_NAME}_pywrap)
ADD_SUBDIRECTORY(bindings)
# --- EXECUTABLES --------------------------------------------------------------
......
......@@ -134,7 +134,6 @@ IF(BUILD_PYTHON_INTERFACE)
SYMLINK_AND_INSTALL_HEADERS("${${PROJECT_NAME}_PARSER_PYTHON_HEADERS}" "")
# --- COMPILE WRAPPER
SET(PYWRAP ${PROJECT_NAME}_pywrap)
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/lib/python/${PROJECT_NAME}")
SET(${PYWRAP}_SOURCES ${${PROJECT_NAME}_PYTHON_SOURCES} ${${PROJECT_NAME}_PARSER_PYTHON_SOURCES})
SET(${PYWRAP}_HEADERS ${${PROJECT_NAME}_PYTHON_HEADERS} ${${PROJECT_NAME}_PARSER_PYTHON_HEADERS})
......
......@@ -36,10 +36,10 @@ def color(body_number=1):
class ModelWrapper(object):
def __init__(self, model, name=None, display=False):
def __init__(self, name=None, display=False):
self.visuals = [('universe', se3.SE3.Identity(), se3.SE3.Identity().translation)]
self.name = self.__class__.__name__ if name is None else name
self.model = model
self.model = se3.Model.BuildEmptyModel()
self.display = display
self.add_joints()
......@@ -149,4 +149,5 @@ class SimplestWalker(ModelWrapper):
},
]
SimplestWalker(model)
walker = SimplestWalker()
model = walker.model
......@@ -36,11 +36,6 @@ MACRO(ADD_UNIT_TEST NAME PKGS)
TARGET_LINK_LIBRARIES(${NAME} ${PROJECT_NAME})
TARGET_LINK_LIBRARIES(${NAME} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
IF(BUILD_PYTHON_INTERFACE)
TARGET_LINK_BOOST_PYTHON(${NAME})
TARGET_LINK_LIBRARIES(${NAME} ${PYTHON_LIBRARIES})
ENDIF(BUILD_PYTHON_INTERFACE)
ADD_TEST(NAME ${NAME} COMMAND ${NAME})
ADD_DEPENDENCIES(check ${NAME})
ENDMACRO(ADD_UNIT_TEST)
......@@ -98,8 +93,11 @@ IF(LUA5_1_FOUND)
ENDIF(LUA5_1_FOUND)
IF(BUILD_PYTHON_INTERFACE)
ADD_UNIT_TEST(python_parser eigen3)
ADD_EXECUTABLE(python_parser python_parser.cpp)
ADD_TEST_CFLAGS(python_parser '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
TARGET_LINK_LIBRARIES(python_parser ${PYWRAP})
TARGET_LINK_LIBRARIES(python_parser ${PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(python_parser ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
ENDIF(BUILD_PYTHON_INTERFACE)
# Work in progress
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment