From: vsr Date: Thu, 24 Sep 2020 09:28:02 +0000 (+0300) Subject: bos #19241 Prevent shaper tests hanging up X-Git-Tag: V9_6_0a1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=50fcc76046263db83900592d8ba8e311b5ef6e1f;p=modules%2Fkernel.git bos #19241 Prevent shaper tests hanging up --- diff --git a/bin/runSalome.py b/bin/runSalome.py index a5997a2b1..41eb05b03 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -855,10 +855,12 @@ def foreGround(clt, args): dt = 0.1 nbtot = 100 nb = 0 + session_pid = None while 1: try: status = session.GetStatSession() gui_detected = status.activeGUI + session_pid = session.getPID() except: pass if gui_detected: @@ -878,9 +880,9 @@ def foreGround(clt, args): # -- server = Server({}) if sys.platform == "win32": - server.CMD = [os.getenv("PYTHONBIN"), "-m", "killSalomeWithPort", "--spy", "%s"%(os.getpid()), "%s"%(port)] + server.CMD = [os.getenv("PYTHONBIN"), "-m", "killSalomeWithPort", "--spy", "%s"%(session_pid or os.getpid()), "%s"%(port)] else: - server.CMD = ["killSalomeWithPort.py", "--spy", "%s"%(os.getpid()), "%s"%(port)] + server.CMD = ["killSalomeWithPort.py", "--spy", "%s"%(session_pid or os.getpid()), "%s"%(port)] server.run() # os.system("killSalomeWithPort.py --spy %s %s &"%(os.getpid(), port)) # -- @@ -922,7 +924,7 @@ def runSalome(): except: pass # -- - test = test and os.getenv("SALOME_TEST_MODE", "0") != "1" +# test = test and os.getenv("SALOME_TEST_MODE", "0") != "1" test = test and args['foreground'] # -- if test: