From 2ac03fbc9dc12caaf24526d073ff18fa3e7ddf81 Mon Sep 17 00:00:00 2001 From: Hugo Jean Ponsin Date: Thu, 11 Jun 2026 09:37:43 +0200 Subject: [PATCH] removing infinit loop --- test/test.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test.py b/test/test.py index 2b0c89f..bd343a2 100644 --- a/test/test.py +++ b/test/test.py @@ -1,6 +1,7 @@ import subprocess import sys import signal +from time import sleep from caproto_wrapper import CaprotoWrapper @@ -8,9 +9,15 @@ def is_ioc_running(): return "" != CaprotoWrapper.raw_read("ePowerSwitch_set_outlet_1") def start_iocshell(): + attempt = 0; res = subprocess.Popen(["./startioc.sh"]) - while not is_ioc_running(): + while not is_ioc_running() and attempt < 10: + sleep(1) + attempt += 1 pass + if attempt == 10: + print("IOCSHELL didn't start on time"); + sys.exit(-1) return res def start_sim():