From 47a2ee4e3b49541b2f2a72725548f720f4938ab1 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 30 Oct 2014 11:17:57 +0300 Subject: [PATCH] Change a way the tests are running - By default, tests are running in a terminal SALOME session - Add option to run tests in a GUI SALOME session --- test/VisuPrs/Util/paravistest.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/test/VisuPrs/Util/paravistest.py b/test/VisuPrs/Util/paravistest.py index a3569df3..5afd870e 100755 --- a/test/VisuPrs/Util/paravistest.py +++ b/test/VisuPrs/Util/paravistest.py @@ -80,13 +80,15 @@ class SalomeSession(object): def __init__(self): import runSalome import sys - #sys.argv += ["--killall"] - #sys.argv += ["--portkill=" + port] - sys.argv += ["--show-desktop=1"] - sys.argv += ["--splash=0"] + if "INGUI" in sys.argv: + sys.argv += ["--gui"] + sys.argv += ["--show-desktop=1"] + sys.argv += ["--splash=0"] + #sys.argv += ["--standalone=study"] + #sys.argv += ["--embedded=SalomeAppEngine,cppContainer,registry,moduleCatalog"] + else: + sys.argv += ["--terminal"] sys.argv += ["--modules=MED,PARAVIS"] - sys.argv += ["--standalone=study"] - sys.argv += ["--embedded=SalomeAppEngine,cppContainer,registry,moduleCatalog"] clt, d = runSalome.main() port = d['port'] self.port = port @@ -370,3 +372,9 @@ def delete_with_inputs(obj): # Run Salome salome_session = SalomeSession() salome.salome_init() +session_server = salome.naming_service.Resolve('/Kernel/Session') +if session_server: + session_server.emitMessage("connect_to_study") + session_server.emitMessage("activate_viewer/ParaView") + pass + -- 2.39.2