STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 2)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
IF(SALOME_BUILD_TESTS)
LIST(APPEND _${PROJECT_NAME}_exposed_targets YACSDLTest PluginSimplex
- PluginOptEvTest1 TestComponentLocal)
+ PluginOptEvTest1 TestComponentLocal yacsloader_echo)
ENDIF(SALOME_BUILD_TESTS)
IF(SALOME_BUILD_GUI)
SET(YACS_GenericGui GenericGui)
SET(YACS_YACS YACS)
SET(YACS_SalomeWrap SalomeWrap)
+SET(YACS_yacsloader_echo yacsloader_echo)
# for source files.
exclude_trees = ['.build','ref','images','CVS']
+# A list of glob-style patterns that should be excluded when looking for source
+# files. They are matched against the source file names relative to the
+# source directory, using slashes as directory separators on all platforms.
+exclude_patterns = ['**/CVS']
+
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
ADD_EXECUTABLE(TestBases ${TestBases_SOURCES})
TARGET_LINK_LIBRARIES(TestBases YACSBases ${CPPUNIT_LIBRARIES} ${PTHREAD_LIBRARIES})
-ADD_TEST(TestBases TestBases)
\ No newline at end of file
+SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+ADD_TEST(TestBases TestBases)
+SET_TESTS_PROPERTIES(TestBases PROPERTIES ENVIRONMENT "${tests_env}")
\ No newline at end of file
if(iter!=_infos.end())
return (*iter).second[id];
else
- return pair<OutPort *, InPort *>(0,0);
+ return pair<OutPort *, InPort *>( reinterpret_cast<OutPort *>(0), reinterpret_cast<InPort *>(0) );
}
std::vector< std::pair<OutPort *, InPort *> > LinkInfo::getWarnLink(unsigned id, WarnReason reason) const
std::pair<OutPort *, InPort *> LinkInfo::getErrLink(unsigned id, ErrReason reason) const
{
if(reason==E_NEVER_SET_INPUTPORT)
- return pair<OutPort *, InPort *>(0,_unsetInPort[id]);
+ return pair<OutPort *, InPort *>( reinterpret_cast<OutPort *>(0), _unsetInPort[id] );
else if(reason==E_ONLY_BACKWARD_DEFINED)
- return pair<OutPort *, InPort *>(0,_onlyBackDefined[id]);
+ return pair<OutPort *, InPort *>( reinterpret_cast<OutPort *>(0), _onlyBackDefined[id] );
else
{
map<ErrReason, vector< pair<OutPort *,InPort *> > >::const_iterator iter=_errors.find(reason);
if(iter!=_errors.end())
return (*iter).second[id];
else
- return pair<OutPort *, InPort *>(0,0);
+ return pair<OutPort *, InPort *>( reinterpret_cast<OutPort *>(0), reinterpret_cast<InPort *>(0) );
}
}
ADD_EXECUTABLE(IntegrationTestEngine ${IntegrationTestEngine_SOURCES})
TARGET_LINK_LIBRARIES(IntegrationTestEngine ${_link_LIBRARIES})
-ADD_TEST(IntegrationTestEngine IntegrationTestEngine)
\ No newline at end of file
+SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+ADD_TEST(IntegrationTestEngine IntegrationTestEngine)
+SET_TESTS_PROPERTIES(IntegrationTestEngine PROPERTIES ENVIRONMENT "${tests_env}")
\ No newline at end of file
CPPUNIT_ASSERT_EQUAL(0,(int)info.getNumberOfInfoLinks(I_ALL)); CPPUNIT_ASSERT_EQUAL(0,(int)info.getNumberOfWarnLinksGrp(W_ALL));
CPPUNIT_ASSERT_EQUAL(1,(int)info.getNumberOfErrLinks(E_ALL)); CPPUNIT_ASSERT_EQUAL(1,(int)info.getNumberOfErrLinks(E_ALL));
CPPUNIT_ASSERT_EQUAL(1,(int)info.getNumberOfErrLinks(E_NEVER_SET_INPUTPORT));
- pair<OutPort *, InPort *> p1=info.getErrLink(0,E_NEVER_SET_INPUTPORT); pair<OutPort *, InPort *> p2(0,i11_1);
+ pair<OutPort *, InPort *> p1=info.getErrLink(0,E_NEVER_SET_INPUTPORT); pair<OutPort *, InPort *> p2( reinterpret_cast<OutPort *>(0), i11_1 );
CPPUNIT_ASSERT(p1==p2);
//
i11_1->edInit(3.14);
_dwTree = new QDockWidget(_parent);
_dwTree->setVisible(false);
_dwTree->setWindowTitle("Tree View: edition mode");
+ _dwTree->setObjectName("Tree View");
_parent->addDockWidget(Qt::LeftDockWidgetArea, _dwTree);
_dwStacked = new QDockWidget(_parent);
_dwStacked->setVisible(false);
_dwStacked->setWindowTitle("Input Panel");
+ _dwStacked->setObjectName("Input Panel");
_dwStacked->setMinimumWidth(270); // --- force a minimum until display
_parent->addDockWidget(Qt::RightDockWidgetArea, _dwStacked);
_dwCatalogs = new QDockWidget(_parent);
_dwCatalogs->setVisible(false);
_dwCatalogs->setWindowTitle("Catalogs");
+ _dwCatalogs->setObjectName("Catalogs");
_parent->addDockWidget(Qt::RightDockWidgetArea, _dwCatalogs);
_catalogsWidget = new CatalogWidget(_dwCatalogs,
_builtinCatalog,
{
// put graph in Bloc node before
std::string blocname = PutGraphInBloc();
+ // put the built bloc into target node type
Proc* proc = GuiContext::getCurrent()->getProc();
Node* bloc = proc->getChildByShortName(blocname);
SubjectNode * sbloc = GuiContext::getCurrent()->_mapOfSubjectNode[bloc];
SubjectNode * snode = CreateNode(typeNode);
// put the built bloc into target node
sbloc->putInComposedNode(snode->getName(), typeNode);
- // arrange local nodes in Proc
+ // select a target node
YACS::HMI::SubjectProc* subproc = QtGuiContext::getQtCurrent()->getSubjectProc();
QtGuiContext::getQtCurrent()->setSelectedSubject(subproc);
arrangeNodes(false);
std::string blocname = tryname.str();
//put one by one the child nodes of Proc node into a new Bloc node
- SubjectNode * snode;
+ std::map< std::string, std::pair<QPointF, QPointF> > aMapOfNodePosition;
+ SceneItem *item = 0;
+ SceneNodeItem *inode = 0;
+ SubjectNode * snode = 0;
for (std::list<Node*>::iterator it = children.begin(); it != children.end(); ++it)
{
snode = GuiContext::getCurrent()->_mapOfSubjectNode[(*it)];
snode->saveLinks();
+ item = QtGuiContext::getQtCurrent()->_mapOfSceneItem[snode];
+ YASSERT(item);
+ inode = dynamic_cast<SceneNodeItem*>(item);
+ YASSERT(inode);
+ // save current node position to restore it after reparenting
+ aMapOfNodePosition[snode->getName()] = std::make_pair(inode->pos(), QPointF(inode->getExpandedX(), inode->getExpandedY()));
+ // put in Bloc node
snode->putInComposedNode(blocname, "Bloc", false);
}
for (std::list<Node*>::iterator it = children.begin(); it != children.end(); ++it)
snode = 0;
snode = GuiContext::getCurrent()->_mapOfSubjectNode[(*it)];
snode->restoreLinks();
+ item = QtGuiContext::getQtCurrent()->_mapOfSceneItem[snode];
+ YASSERT(item);
+ inode = dynamic_cast<SceneNodeItem*>(item);
+ YASSERT(inode);
+ // restore node position
+ inode->setPos(aMapOfNodePosition[snode->getName()].first);
+ // update node position for shrink/expand operation
+ inode->setExpandedPos(aMapOfNodePosition[snode->getName()].second);
+ // notify node about position changing
+ inode->checkGeometryChange();
}
- // arrange local nodes in Proc
+ Node* bloc = proc->getChildByShortName(blocname);
+ SubjectNode* sbloc = GuiContext::getCurrent()->_mapOfSubjectNode[bloc];
+ item = QtGuiContext::getQtCurrent()->_mapOfSceneItem[sbloc];
+ YASSERT(item);
+ // notify bloc about child position changing
+ item->checkGeometryChange();
+ // select a target bloc
YACS::HMI::SubjectProc* subproc = QtGuiContext::getQtCurrent()->getSubjectProc();
QtGuiContext::getQtCurrent()->setSelectedSubject(subproc);
- arrangeNodes(false);
return blocname;
}
string endnode = "";
string startport = "";
string endport = "";
- TypeOfElem startportType;
- TypeOfElem endportType;
+ TypeOfElem startportType = UNKNOWN;
+ TypeOfElem endportType = UNKNOWN;
if (dynamic_cast<SubjectProc*>(son))
startnode = proc->getName();
throw Exception("Error during execution");
}
PyObject *res = PyEval_EvalCode((PyCodeObject *)code, _context, _context);
+
Py_DECREF(code);
+ Py_XDECREF(res);
DEBTRACE( "_context refcnt: " << _context->ob_refcnt );
fflush(stdout);
fflush(stderr);
- if(res == NULL)
+ if(PyErr_Occurred ())
{
_errorDetails="";
PyObject* new_stderr = newPyStdOut(_errorDetails);
PyGILState_Release(gstate);
throw Exception("Error during execution");
}
- Py_DECREF(res);
DEBTRACE( "-----------------PyNode::outputs-----------------" );
list<OutputPort *>::iterator iter;
}
PyObject *res = PyEval_EvalCode((PyCodeObject *)code, _context, _context);
Py_DECREF(code);
+ Py_XDECREF(res);
DEBTRACE( "_context refcnt: " << _context->ob_refcnt );
- if(res == NULL)
+ if(PyErr_Occurred ())
{
_errorDetails="";
PyObject* new_stderr = newPyStdOut(_errorDetails);
throw Exception("Error during execution");
return;
}
- Py_DECREF(res);
_pyfunc=PyDict_GetItemString(_context,_fname.c_str());
DEBTRACE( "_pyfunc refcnt: " << _pyfunc->ob_refcnt );
if(_pyfunc == NULL)
SET(SHELL /bin/sh)
SALOME_CONFIGURE_FILE(xmlrun_orig.sh xmlrun.sh)
ADD_TEST(NAME runtimeTest COMMAND ${SHELL} ${CMAKE_CURRENT_SOURCE_DIR}/runtimeTest.sh)
- SET_TESTS_PROPERTIES(runtimeTest PROPERTIES ENVIRONMENT ${tests_env})
+ SET_TESTS_PROPERTIES(runtimeTest PROPERTIES ENVIRONMENT "${tests_env}")
ENDIF()
</message>
<message>
<source>PREF_TAB_NODE</source>
- <translation>ノード</translation>
+ <translation>節点</translation>
</message>
<message>
<source>PREF_GROUP_SCENE</source>
</message>
<message>
<source>PREF_GROUP_DRAG</source>
- <translation>ドラッグ</translation>
+ <translation>ドラッグします。</translation>
</message>
<message>
<source>PREF_GROUP_GENERAL</source>
</message>
<message>
<source>COMPONENT_INSTANCE_NEW</source>
- <translation>各新しいサービス ノードのコンポーネント インスタンスを作成します。</translation>
+ <translation>新しい各サービス ノードのコンポーネントのインスタンスを作成します。</translation>
</message>
<message>
<source>ERROR</source>
# --- rules ---
-INSTALL(FILES ${salomeloader_SCRIPTS} DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(PROGRAMS ${salomeloader_SCRIPTS} DESTINATION ${SALOME_INSTALL_BINS})
INSTALL(FILES ${salomeloader_PYTHON} DESTINATION ${SALOME_INSTALL_PYTHON})
# --- rules ---
OMNIORB_ADD_MODULE(yacsloader_echo "${echo_IDL_FILES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
+INSTALL(TARGETS yacsloader_echo DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(TestYacsLoader ${TestYacsLoader_SOURCES})
TARGET_LINK_LIBRARIES(TestYacsLoader yacsloader_echo ${TestYacsLoader_LIBRARIES})
SALOME_CONFIGURE_FILE(YacsLoaderInSessionTest.sh.in YacsLoaderInSessionTest.sh)
SALOME_CONFIGURE_FILE(display.sh.in display.sh)
SALOME_CONFIGURE_FILE(waitContainers.py waitContainers.py)
+ SALOME_CONFIGURE_FILE(xmlrun_orig.sh xmlrun.sh)
ADD_TEST(NAME YacsLoaderTest COMMAND ${SHELL} YacsLoaderTest.sh)
ENDIF()
Proc *p = 0;
int ret;
ret = driverTest(p, "samples/foreach1.xml");
- CPPUNIT_ASSERT(ret == 0);
- CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach1.xml", ret == 0);
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach1.xml", p->getEffectiveState() == YACS::DONE);
ret = driverTest(p, "samples/foreach2.xml");
- CPPUNIT_ASSERT(ret == 0);
- CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach2.xml", ret == 0);
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach2.xml", p->getEffectiveState() == YACS::DONE );
ret = driverTest(p, "samples/foreach3.xml");
- CPPUNIT_ASSERT(ret == 1);
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach3.xml", ret == 1);
ret = driverTest(p, "samples/foreach4.xml");
- CPPUNIT_ASSERT(ret == 0);
- CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach4.xml", ret == 0);
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach4.xml", p->getEffectiveState() == YACS::DONE );
ret = driverTest(p, "samples/foreach5.xml");
- CPPUNIT_ASSERT(ret == 0);
- CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach5.xml", ret == 0);
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach5.xml", p->getEffectiveState() == YACS::DONE );
ret = driverTest(p, "samples/foreach6.xml");
- CPPUNIT_ASSERT(ret == 0);
- CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
- ret = driverTest(p, "samples/foreach7.xml"); //needs GEOM_Superv component
- CPPUNIT_ASSERT(ret == 0);
- CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach6.xml", ret == 0);
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach6.xml", p->getEffectiveState() == YACS::DONE );
+ if(getenv("GEOM_ROOT_DIR"))
+ {
+ std::string geomdir(getenv("GEOM_ROOT_DIR"));
+ geomdir=geomdir+"/share/salome/resources/geom";
+ if(access(geomdir.c_str(),F_OK) == 0)
+ {
+ ret = driverTest(p, "samples/foreach7.xml"); //needs GEOM_Superv component
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach7.xml", ret == 0);
+ CPPUNIT_ASSERT_MESSAGE("Schema: foreach7.xml", p->getEffectiveState() == YACS::DONE );
+ }
+ }
}
void YacsLoaderTest::sinlines()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+if test -f @CMAKE_CURRENT_BINARY_DIR@/config_appli.xml; then
+ if test -n "${GEOM_ROOT_DIR}" && test -d ${GEOM_ROOT_DIR}; then
+ sed -i s%\"GEOM_ROOT_DIR\"%\"${GEOM_ROOT_DIR}\"% @CMAKE_CURRENT_BINARY_DIR@/config_appli.xml
+ fi
+ if test -n "${PYHELLO_ROOT_DIR}" && test -d ${PYHELLO_ROOT_DIR}; then
+ sed -i s%\"PYHELLO_ROOT_DIR\"%\"${PYHELLO_ROOT_DIR}\"% @CMAKE_CURRENT_BINARY_DIR@/config_appli.xml
+ fi
+fi
+
if test -f @KERNEL_ROOT_DIR@/bin/salome/appli_gen.py ; then
# --- create a SALOME Application environment
<!-- attribute gui (defaults = yes) indicates if the module has a gui interface -->
<module name="KERNEL" gui="no" path="@KERNEL_ROOT_DIR@"/>
<module name="GUI" gui="no" path="@GUI_ROOT_DIR@"/>
+ <module name="GEOM" path="GEOM_ROOT_DIR"/> <!--GEOM_ROOT_DIR will be substituted at starting of test-->
+ <module name="PYHELLO" path="PYHELLO_ROOT_DIR"/> <!--PYHELLO_ROOT_DIR will be substituted at starting of test-->
+ <module name="YACS" path="@CMAKE_INSTALL_PREFIX@"/>
</modules>
</application>
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+if test -f @CMAKE_CURRENT_BINARY_DIR@/config_appli.xml; then
+ if test -n "${PYHELLO_ROOT_DIR}" && test -d ${PYHELLO_ROOT_DIR}; then
+ sed -i s%\"PYHELLO_ROOT_DIR\"%\"${PYHELLO_ROOT_DIR}\"% @CMAKE_CURRENT_BINARY_DIR@/config_appli.xml
+ fi
+fi
+
if test -f @KERNEL_ROOT_DIR@/bin/salome/appli_gen.py ; then
# --- create a SALOME Application environment
<!-- attribute gui (defaults = yes) indicates if the module has a gui interface -->
<module name="KERNEL" gui="no" path="@KERNEL_ROOT_DIR@"/>
<module name="GUI" gui="no" path="@GUI_ROOT_DIR@"/>
+ <module name="PYHELLO" path="PYHELLO_ROOT_DIR"/> <!--PYHELLO_ROOT_DIR will be substituted at starting of test-->
+ <module name="YACS" path="@CMAKE_INSTALL_PREFIX@"/>
</modules>
</application>