X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2FTest%2FTestRuntime.cxx;h=bf813ba89f5ac8e5bed61a8bd1e7e7edb360570a;hb=ff6426f394ecc496bfceee444f0fad78e955861e;hp=ec16d53b358229871717e7b720c54077103649ff;hpb=c43d1db1d5d3ba364f63a8a7c7ce4a58ea1c7d26;p=modules%2Fyacs.git diff --git a/src/runtime/Test/TestRuntime.cxx b/src/runtime/Test/TestRuntime.cxx index ec16d53b3..bf813ba89 100644 --- a/src/runtime/Test/TestRuntime.cxx +++ b/src/runtime/Test/TestRuntime.cxx @@ -20,6 +20,8 @@ #define UNIT_TEST_HEADER " --- TEST src/runtime" #include "runtimeTest.hxx" +#include "PythonCppUtils.hxx" +#include "SALOME_Embedded_NamingService.hxx" using namespace YACS; using namespace std; @@ -29,5 +31,26 @@ using namespace std; CPPUNIT_TEST_SUITE_REGISTRATION( RuntimeTest ); // --- generic Main program from bases/Test +#include "BasicMainTestInternal.hxx" +#include "RuntimeSALOME.hxx" -#include "BasicMainTest.hxx" +int main() +{ + YACS::ENGINE::RuntimeSALOME::setRuntime(); + YACS::ENGINE::RuntimeSALOME *rt = YACS::ENGINE::getSALOMERuntime(); + if( !rt ) + return 1; + Engines::EmbeddedNamingService_var ns = GetEmbeddedNamingService(); + CORBA::ORB_ptr orb = rt->getOrb(); + CORBA::String_var ior = orb->object_to_string( ns ); + AutoPyRef proc = rt->launchSubProcess({"./runtimeTestEchoSrv",std::string(ior)}); + usleep(3000000); + int ret = BasicMainTestInternal(); + // + { + AutoGIL agil; + AutoPyRef terminateStr = PyUnicode_FromString("terminate"); + AutoPyRef dummy = PyObject_CallMethodObjArgs(proc,terminateStr,nullptr); + } + return ret; +}