From: Anthony Geay Date: Mon, 18 May 2015 15:44:51 +0000 (+0200) Subject: Do not systematically kill salome session at exit. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5e9f26589f8a0c52ae13e7bed1bd75ccf7ed9049;p=modules%2Fkernel.git Do not systematically kill salome session at exit. --- diff --git a/bin/appliskel/salome_tester/salome_test_session.py b/bin/appliskel/salome_tester/salome_test_session.py index 8f193f572..5bb4682f5 100644 --- a/bin/appliskel/salome_tester/salome_test_session.py +++ b/bin/appliskel/salome_tester/salome_test_session.py @@ -24,7 +24,7 @@ import os # args=["--gui", "--show-desktop=1", "--splash=0"] # args=["--terminal","--modules=MED,PARAVIS,GUI"] class SalomeSession(object): - def __init__(self, args=[]): + def __init__(self, args=[], shutdownAtExit=True): sys.argv = ['runSalome'] + args if "INGUI" in args: @@ -36,7 +36,8 @@ class SalomeSession(object): #sys.argv += ["--embedded=SalomeAppEngine,cppContainer,registry,moduleCatalog"] else: sys.argv += ["--terminal"] - sys.argv += ["--shutdown-servers=1"] + if shutdownAtExit: + sys.argv += ["--shutdown-servers=1"] #sys.argv += ["--modules=MED,PARAVIS,GUI"] pass @@ -49,12 +50,12 @@ class SalomeSession(object): # # Run SALOME -def startSession(): +def startSession(shutdownAtExit=True): import tempfile log = tempfile.NamedTemporaryFile(suffix='_nsport.log', delete=False) log.close() import salome - salome_session = SalomeSession(args=["--ns-port-log=%s"%log.name]) + salome_session = SalomeSession(args=["--ns-port-log=%s"%log.name],shutdownAtExit=shutdownAtExit) salome.salome_init() session_server = salome.naming_service.Resolve('/Kernel/Session') if session_server: