]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
0023423: [CEA 2029] salome -t --valgrind-session does not launch Salome with valgrind
authorvsr <vsr@opencascade.com>
Wed, 6 Sep 2017 12:09:34 +0000 (15:09 +0300)
committervsr <vsr@opencascade.com>
Wed, 6 Sep 2017 12:09:34 +0000 (15:09 +0300)
bin/runSalome.py

index 33886c27ff6a9717d13b00417071dabbdcffc5d8..243ec39c1a2d76138891d1300eca2e646d6f3c12 100755 (executable)
@@ -189,10 +189,18 @@ class RegistryServer(Server):
 # ---
 
 class ContainerCPPServer(Server):
-    def __init__(self,args):
+    def __init__(self,args,with_gui=False):
         self.args=args
         self.initArgs()
         self.CMD=['SALOME_Container','FactoryServer']
+        if not with_gui and self.args["valgrind_session"]:
+            l = ["valgrind"]
+            val = os.getenv("VALGRIND_OPTIONS")
+            if val:
+                l += val.split()
+                pass
+            self.CMD = l + self.CMD
+            pass
 
 # ---
 
@@ -543,7 +551,7 @@ def startSalome(args, modules_list, modules_root_dir):
     #
 
     if ('cppContainer' in args['standalone']) | (args["gui"] == 0) :
-        myServer=ContainerCPPServer(args)
+        myServer=ContainerCPPServer(args, with_gui=args["gui"]!=0)
         myServer.run()
         if sys.platform == "win32":
           clt.waitNS("/Containers/" + theComputer + "/FactoryServer")