From b18d57d9aa43ff89f6dd02cab771a9e7ad7d4e07 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Tue, 10 Sep 2024 23:23:12 +0200 Subject: [PATCH] [EDF30875] : Fix for test08 mem/mem --- src/Container/SALOME_PyNode.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Container/SALOME_PyNode.py b/src/Container/SALOME_PyNode.py index 4a1c2e0d7..65eaec843 100644 --- a/src/Container/SALOME_PyNode.py +++ b/src/Container/SALOME_PyNode.py @@ -860,22 +860,22 @@ from SALOME_PyNode import LogOfCurrentExecutionSession,MY_PERFORMANCE_LOG_ENTRY_ from SALOME_PyNode import ExchangeModeServerSideFactory from KernelBasis import VerbosityActivated,SetVerbosityLevel,SetVerbosityActivated from salome_utils import positionVerbosityOfLoggerRegardingState -import CORBA import Engines +import salome import os +salome.salome_init() from datetime import datetime SetVerbosityActivated( {} ) SetVerbosityLevel( "{}" ) positionVerbosityOfLoggerRegardingState() # WorkDir may be important to replay : "{}" -orb = CORBA.ORB_init(['']) +orb = salome.orb caseDirectory = "{}" contextExchangeMode = "{}" bigObjExchanger = ExchangeModeServerSideFactory( contextExchangeMode ) codeFileName = os.path.join( caseDirectory, "{}" ) inputFileName = "{}" outputFileName = "{}" -del os outputsKeys = {} exec( "{{}} = LogOfCurrentExecutionSession( orb.string_to_object( \\"{}\\" ) )".format(MY_PERFORMANCE_LOG_ENTRY_IN_GLBS) ) if VerbosityActivated(): @@ -1017,6 +1017,7 @@ class ExchangeContextUsingTCP( ExchangeContextBridgeAbs ): pman.activate() obj = SenderByte_i(poa, pickle.dumps( context) ) ; id_o = poa.activate_object(obj) ; refPtr = poa.id_to_reference(id_o) self._data_exchange_channel.pushOutputContext( refPtr ) + pman.deactivate(True,True) def ExchangeModeServerSideFactory( exchangeMode ): if exchangeMode == "File": @@ -1125,7 +1126,6 @@ def ExecCrashProofGeneric( code, context, outargsname, containerRef, instanceOfL import tempfile import pickle import subprocess as sp - import CORBA import logging # def IsConsideredAsOKRun( returnCode, closeEyesOnErrorAtExit , stderr ): @@ -1146,7 +1146,9 @@ def ExecCrashProofGeneric( code, context, outargsname, containerRef, instanceOfL # def InternalExecResistant( exchangeMode, code, context, outargsname): import KernelBasis - orb = CORBA.ORB_init(['']) + import salome + salome.salome_init() + orb = salome.orb iorScriptLog = orb.object_to_string( instanceOfLogOfCurrentSession._remote_handle )#ref ContainerScriptPerfLog_ptr #### EXEC_CODE_FNAME_PXF = "execsafe_" -- 2.39.2