From: adam Date: Tue, 6 Jul 2010 10:32:37 +0000 (+0000) Subject: add --valgrind-session to runSalome X-Git-Tag: Plotenh~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8fdcad2c69486f780c72ea57ce9d18936cdb17b5;p=modules%2Fkernel.git add --valgrind-session to runSalome --- diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index 7fde55b79..b807edad5 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -59,6 +59,7 @@ test_nam = "test" play_nam = "play" gdb_session_nam = "gdb_session" ddd_session_nam = "ddd_session" +valgrind_session_nam = "valgrind_session" shutdown_servers_nam = "shutdown_servers" # values in XML configuration file giving specific module parameters ( section) @@ -638,6 +639,14 @@ def CreateOptionParser (theAdditionalOptions=[]): dest="ddd_session", default=False, help=help_str) + + # valgrind session + help_str = "Launch session with valgrind $VALGRIND_OPTIONS" + o_valgrind = optparse.Option("--valgrind-session", + action="store_true", + dest="valgrind_session", default=False, + help=help_str) + # shutdown-servers. Default: False. help_str = "1 to shutdown standalone servers when leaving python interpreter, " help_str += "0 to keep the standalone servers as daemon [default]. " @@ -675,6 +684,7 @@ def CreateOptionParser (theAdditionalOptions=[]): o_play, # Reproducing test script with help of TestRecorder o_gdb, o_ddd, + o_valgrind, o_shutdown, ] @@ -969,6 +979,10 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"): if cmd_opts.ddd_session is not None: args[ddd_session_nam] = cmd_opts.ddd_session + # valgrind session + if cmd_opts.valgrind_session is not None: + args[valgrind_session_nam] = cmd_opts.valgrind_session + # Shutdown servers if cmd_opts.shutdown_servers is None: args[shutdown_servers_nam] = 0 diff --git a/bin/runSalome.py b/bin/runSalome.py index d03a67d6e..f0bed272d 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -323,6 +323,15 @@ class SessionServer(Server): pass pass + if self.args["valgrind_session"]: + l = ["valgrind"] + val = os.getenv("VALGRIND_OPTIONS") + if val: + l += val.split() + pass + self.CMD = l + self.CMD + pass + # --- class LauncherServer(Server):